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 insert or delete a line (or record) in the middle of a file?

575


What are data structures in c and how to use them?

678


What is the difference between int main and void main in c?

593


Define circular linked list.

571


write a sorting prgm to sort 50 nos and sum them and also remove all the occurrences of 15 and print it?

1674






Write a program to print numbers from 1 to 100 without using loop in c?

642


4. main() { int c=- -2; printf("c=%d",c); }

1370


What is the best way of making my program efficient?

571


How will you delete a node in DLL?

686


What is mean by Data Driven framework in QTP? Can any one answer me in details on this regard.

1784


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

688


c language interview questions & answer

1463


What is use of integral promotions in c?

666


Is this program statement valid? INT = 10.50;

686


Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.

1497