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
Can you please explain the difference between exit() and _exit() function?
What are the header files used in c language?
Why & is used in scanf in c?
the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above
Why is c so powerful?
What are the general description for loop statement and available loop types in c?
What is the use of extern in c?
Why is c platform dependent?
Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.
Can you write the algorithm for Queue?
How are structure passing and returning implemented?
Write the Program to reverse a string using pointers.
what type of questions arrive in interview over c programming?
Why doesnt the call scanf work?
I have a varargs function which accepts a float parameter?