main()
{
char *p;
int *q;
long *r;
p=q=r=0;
p++;
q++;
r++;
printf("%p...%p...%p",p,q,r);
}
Answer / susie
Answer :
0001...0002...0004
Explanation:
++ operator when applied to pointers increments address
according to their corresponding data-types.
Is This Answer Correct ? | 8 Yes | 3 No |
main() { int a[10]; printf("%d",*a+1-*a+3); }
main() { char *p = "hello world"; p[0] = 'H'; printf("%s", p); } a. Runtime error. b. “Hello world” c. Compile error d. “hello world”
main ( ) { static char *s[ ] = {“black”, “white”, “yellow”, “violet”}; char **ptr[ ] = {s+3, s+2, s+1, s}, ***p; p = ptr; **++p; printf(“%s”,*--*++p + 3); }
main() { printf("%d, %d", sizeof('c'), sizeof(100)); } a. 2, 2 b. 2, 100 c. 4, 100 d. 4, 4
18 Answers HCL, IBM, Infosys, LG Soft, Satyam,
main() { int a=10,*j; void *k; j=k=&a; j++; k++; printf("\n %u %u ",j,k); }
Link list in reverse order.
program to Reverse a linked list
12 Answers Aricent, Microsoft, Ness Technologies,
Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange
main() { int x=5; clrscr(); for(;x==0;x--) { printf("x=%d\n”", x--); } } a. 4, 3, 2, 1, 0 b. 1, 2, 3, 4, 5 c. 0, 1, 2, 3, 4 d. none of the above
1) int i=5; j=i++ + i++ + i++; printf("%d",j);This code gives the answer 15.But if we replace the value of the j then anser is different?why? 2)int i=5; printf("%d",i++ + i++ + i++); this givs 18.
How do you write a program which produces its own source code as its output?
#ifdef something int some=0; #endif main() { int thing = 0; printf("%d %d\n", some ,thing); }