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

Why is sprintf unsafe?

1078


Explain spaghetti programming?

1258


Why we write conio h in c?

1039


Is there a way to compare two structure variables?

1126


What are the 5 types of organizational structures?

1080


How can I find the modification date and time of a file?

1087


Explain how do I determine whether a character is numeric, alphabetic, and so on?

1137


Why do we use pointer to pointer in c?

1086


What is structure and union in c?

1152


What is character constants?

1187


Why doesnt long int work?

1044


What does #pragma once mean?

1166


What is c language used for?

988


What is wild pointer in c?

1078


Explain how do you view the path?

1178