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
Why is sprintf unsafe?
Explain spaghetti programming?
Why we write conio h in c?
Is there a way to compare two structure variables?
What are the 5 types of organizational structures?
How can I find the modification date and time of a file?
Explain how do I determine whether a character is numeric, alphabetic, and so on?
Why do we use pointer to pointer in c?
What is structure and union in c?
What is character constants?
Why doesnt long int work?
What does #pragma once mean?
What is c language used for?
What is wild pointer in c?
Explain how do you view the path?