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


Please Help Members By Posting Answers For Below Questions

What do you mean by c?

581


How does normalization of huge pointer works?

625


Explain can static variables be declared in a header file?

672


What is pointer to pointer in c?

630


Simplify the program segment if X = B then C ← true else C ← false

2577






how can f be used for both float and double arguments in printf? Are not they different types?

604


What happens if you free a pointer twice?

604


How does struct work in c?

604


List the variables are used for writing doubly linked list program.

1615


What are formal parameters?

652


Can you explain the four storage classes in C?

638


Why do we need arrays in c?

577


What is this pointer in c plus plus?

588


What is a memory leak? How to avoid it?

568


What are the types of type qualifiers in c?

642