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

What is s in c?

0 Answers  


In a switch statement, what will happen if a break statement is omitted?

0 Answers  


What is the purpose of the preprocessor directive error?

0 Answers  


Write a program to reverse a linked list in c.

0 Answers   DELL, HAL,


if a five digit number is input through the keyboard, write a program to calculate the sum of its digits. (hint:-use the modulus operator.'%')

23 Answers  






What does == mean in texting?

0 Answers  


Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates

3 Answers  


Suppose I want to write a function that takes a generic pointer as an argument and I want to simulate passing it by reference. Can I give the formal parameter type void **, and do something like this? void f(void **); double *dp; f((void **)&dp);

1 Answers  


What is the difference between typeof(foo) and myFoo.GetType()?

2 Answers   Synergy,


Write a program to remove the C comments(/* */) and C++ comments(//) from a file. The file should be declared in command line.

4 Answers   Persistent, Subex,


Write a c program to print the even numbers followed by odd numbers in an array without using additional array

1 Answers   Tech Mahindra,


What is the difference between CV and Resume ?

2 Answers  


Categories