Category: Array

19
May
2017

Relationship Between 1D array and pointer

code: #include<stdio.h> int main() { int i; int x[]= {10,20,30,40,50}; printf(“%p %p\n”,x+1,&x[1]); //base address is always pointing…

18
May
2017

Lowercase to Uppercase with array

code: #include<stdio.h> char converter() { char ch[100]; gets(ch); int t,l,i; for(i=0; ch[i]!=’\0′; i++); //printf(“%d”,i); for(t=0; t<i; t++)…

13
May
2017

Returning From Array Function in C

As I am learning I didn’t find the solution yet when I was trying to make a…

13
May
2017

Extract Digits From a Number and Make a Sum of all the digits and show this in C

Code is here: #include<stdio.h> int main() { int number; scanf(“%d”,&number); char digits[2000000]; int i=0,d; while(number>0) { d=number%10;…

11
May
2017

2d Array Explained Perfectly

Vid: code: #include<stdio.h> int main() { int x[4][3]; int i,j; for(i=0; i<4; i++) { for(j=0; j<3; j++)…

12
Apr
2017

Array Self Input Size

#include<stdio.h> int main() { int i,j,p,q,a[100][100]; printf(“enter value:”); scanf(“%d %d”,&i,&j); for(p=0;p<i;p++) { for(q=0;q<j;q++){ scanf(“%d”,&a[p][q]); } } for(p=0;p<i;p++)…