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);


}




write the output of following code .. main() { static int a[]={10,20,30,40,50}; ..

Answer / 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

More C Interview Questions

What is difference between main and void main?

0 Answers  


Is c language still used?

0 Answers  


What is difference between %d and %i in c?

0 Answers  


What is pragma c?

0 Answers  


in C-programming language without using printf statement can we get output r not ? if yes how and if no also how ?

11 Answers   IBM,


What is calloc() function?

0 Answers  


What is stack in c?

0 Answers  


What does the format %10.2 mean when included in a printf statement?

0 Answers  


What is the explanation for the dangling pointer in c?

0 Answers  


WRITE A PROGRAM TO FIND A REVERSE OF TWO NO

7 Answers  


What would be an example of a structure analogous to structure c?

0 Answers  


What is formal argument?

0 Answers  


Categories