Consider the declaration
int a = 5, *b = &a;
The statement
printf("%d", a * b);
prints
A. | 25 |
B. | garbage |
C. | 5 x address of b |
D. | an error message |
Option: D Explanation : Click on Discuss to view users comments. |
Consider the following segment
char *a, *b, c[10], d[10];
a = b;
b = c;
c = d;
d = a;
choose the statements having errors
A. | no error |
B. | a = b; and b = c; |
C. | c = d; and d = a; |
D. | a = b; and d = a; |
Option: C Explanation : Click on Discuss to view users comments. |
calloc(m, n); is equivalent to
A. | malloc (m*n, 0); |
B. | memset(0, m*n); |
C. | ptr = malloc (m*n); memset (p, 0, m*n); |
D. | ptr = malloc(m*n); strcpy(p, u); |
Option: C Explanation : Click on Discuss to view users comments. |