Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write the output of following code ..


main()



{


static int a[]={10,20,30,40,50};


int *ptr=a;


static int arr[2][2]={1,2,3,4};


char str[]="ABCD * 4#";


char *s=str+2;


int i,j;


for(i=0;i<5,i++)


printf("%d",*ptr++);


for(i=0;i<2;i++)


for(j=0;j<2;j++)


printf("%d\n",*(*(n+i)+j));


printf("%c\n%c\n%c\n",*(str+2),*s++,*--s);


}


Answer Posted / pramod

There is a compilation error in the line.
printf("%d\n",*(*(n+i)+j)); as n is not defined. If we
assume arr in place of n then the output is:

10203040501
2
3
4
C
B
B

Is This Answer Correct ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a c program to print the next of a particular no without using the arithmetic operator or looping statements?

3841


How do we declare variables in c?

1008


Is int a keyword in c?

906


What is signed and unsigned?

1014


What is the use of structure padding in c?

1014


Can we access array using pointer in c language?

1041


Does sprintf put null character?

988


Explain what are multidimensional arrays?

1009


Explain what math functions are available for integers? For floating point?

1062


What is the difference between local variable and global variable in c?

1164


Explain the difference between null pointer and void pointer.

1031


Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?

1048


How are structure passing and returning implemented?

985


Is c easy to learn?

933


What is || operator and how does it function in a program?

1041