int (*f())[ ];
declares
To understand the declaration $int (*f())[ ];$, we break it down based on C's declaration rules (right-left parsing):
Therefore, the statement declares a function returning a pointer to an array of integers.
What is the output of the following C programming language code?
#include<stdio.h>
int main()
{
int x = 10;
int *p = &x;
*p = *p + 5;
printf("%d %d", x, *p);
return 0;
}
Consider the following ANSI-C program.
#include <stdio.h>
int main(){
int *ptr, a, b, c;
a=5; b=11; c=20;
ptr=&a; *ptr=c; ptr=&c;
a=*(&b); c=*ptr-a;
printf("%d",c);
return(0);
}
The output of this program is ____________. (answer in integer)
Note: Assume that the program compiles and runs successfully.
What is the output of the following program ?
(Assume that the appropriate preprocessor directives are included and there is no syntax error)
main ( )
{ char S[ ]="ABCDEFGH";
printf ("%C", * (& S[3]));
printf ("%s", S+4);
printf ("%u", S);
/* Base address of S is 1000 */
}