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
How can I get the current date or time of day in a c program?
What is s in c?
What is the difference between exit() and _exit() function in c?
why wipro wase
Which function in C can be used to append a string to another string?
What is this pointer in c plus plus?
What are the advantages and disadvantages of pointers?
Explain how can I read and write comma-delimited text?
What is the difference between far and near ?
How can I do peek and poke in c?
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
what are the 10 different models of writing an addition program in C language?
Is c object oriented?
What is the difference between scanf and fscanf?
What tq means in chat?