study the code:
#include<stdio.h>
void main()
{
const int a=100;
int *p;
p=&a;
(*p)++;
printf("a=%dn(*p)=%dn",a,*p);
}
What is printed?
A)100,101 B)100,100 C)101,101 D)None of the
above
Answer Posted / madhu
D) NONE OF THE ABOVE
COZ
ANS IS A=101n (*p)=101n
to get this *p should be an constant pointer
Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What do you mean by c?
How does normalization of huge pointer works?
Explain can static variables be declared in a header file?
What is pointer to pointer in c?
Simplify the program segment if X = B then C ← true else C ← false
how can f be used for both float and double arguments in printf? Are not they different types?
What happens if you free a pointer twice?
How does struct work in c?
List the variables are used for writing doubly linked list program.
What are formal parameters?
Can you explain the four storage classes in C?
Why do we need arrays in c?
What is this pointer in c plus plus?
What is a memory leak? How to avoid it?
What are the types of type qualifiers in c?