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
What math functions are available for integers? For floating point?
can anyone suggest some site name..where i can get some good data structure puzzles???
Which built-in library function can be used to match a patter from the string?
How does free() know explain how much memory to release?
What are file streams?
What is %d used for?
Explain About fork()?
What is variables in c?
What is a rvalue?
Can we declare variables anywhere in c?
What is sizeof c?
What is the use of a conditional inclusion statement in C?
What do you mean by scope of a variable in c?
What are the functions to open and close the file in c language?
Is exit(status) truly equivalent to returning the same status from main?