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

Answers were Sorted based on User's Feedback



study the code: #include<stdio.h> void main() { const int a=100; int *p; p=&a; (*p)..

Answer / jitendra kumar arya

(d),because n treat as a chracter.
ans is 100n ,101n

Is This Answer Correct ?    1 Yes 3 No

study the code: #include<stdio.h> void main() { const int a=100; int *p; p=&a; (*p)..

Answer / sundar

the output is

a=100n(*p)=101n

Is This Answer Correct ?    0 Yes 2 No

study the code: #include<stdio.h> void main() { const int a=100; int *p; p=&a; (*p)..

Answer / 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

study the code: #include<stdio.h> void main() { const int a=100; int *p; p=&a; (*p)..

Answer / sathya.r

Ans: 100,100

Is This Answer Correct ?    1 Yes 4 No

study the code: #include<stdio.h> void main() { const int a=100; int *p; p=&a; (*p)..

Answer / manoj

B)100,100

Is This Answer Correct ?    0 Yes 4 No

Post New Answer

More C Interview Questions

Write a factorial program using C.

0 Answers   iNautix,


write a program to display the numbers in the following format 4 4 3 3 3 3 2 2 2 2 2 2 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 4

9 Answers   IBM, NIIT, Winit,


What are bitwise shift operators in c programming?

0 Answers  


What is the difference between new and malloc functions?

0 Answers   InterGraph,


a value that does not change during program execution a) variabe b) argument c) parameter d) none

0 Answers  


What are the types of variables in c?

0 Answers  


What is unsigned int in c?

0 Answers  


c program to compute Income tax and Net Salary for its employees. The company offers tax relief of Kshs. 650 for single employees and Kshs. 1,100 for married employees. The relief will be deducted from the Gross salary, to give the taxable income. This will be computed at the following rates: [10mks] Taxable Income Rate (%) <5000 0 5000-19999 6 20000-36999 9 37000 and above 16

1 Answers  


in which language c language is written?

2 Answers  


what is the use of #pragma pack, wer it is used?

2 Answers   Wipro,


program to find the magic square

1 Answers   Infosys,


How to swap 3 numbers without using 4th variable?

5 Answers  


Categories