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 insert or delete a line (or record) in the middle of a file?
What are data structures in c and how to use them?
What is the difference between int main and void main in c?
Define circular linked list.
write a sorting prgm to sort 50 nos and sum them and also remove all the occurrences of 15 and print it?
Write a program to print numbers from 1 to 100 without using loop in c?
4. main() { int c=- -2; printf("c=%d",c); }
What is the best way of making my program efficient?
How will you delete a node in DLL?
What is mean by Data Driven framework in QTP? Can any one answer me in details on this regard.
An arrangement of information in memory in such a way that it can be easily accessed and processed by a programming language a) string b) data structure c) pointers d) array
c language interview questions & answer
What is use of integral promotions in c?
Is this program statement valid? INT = 10.50;
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.