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 / venkataramani kumar.t.b.

The Answer is C) a=101 and (*p)=101.

Since the variable is not directly accessed and it
increments thru' the pointer, so the answer is valid

Is This Answer Correct ?    2 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I get the current date or time of day in a c program?

742


What is s in c?

716


What is the difference between exit() and _exit() function in c?

689


why wipro wase

1920


Which function in C can be used to append a string to another string?

744






What is this pointer in c plus plus?

697


What are the advantages and disadvantages of pointers?

684


Explain how can I read and write comma-delimited text?

780


What is the difference between far and near ?

796


How can I do peek and poke in c?

729


an expression contains relational operators, assignment operators, and arithmatic operstors. In the absence of parentheses, they will be evaluated in which of the following order a) assignment, relational, arithematic b) arithematic, relational, assignment c) relational, arithematic, assignment d) assignment, arithematic, relational

932


what are the 10 different models of writing an addition program in C language?

1529


Is c object oriented?

630


What is the difference between scanf and fscanf?

749


What tq means in chat?

702