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
Answer / jitendra kumar arya
(d),because n treat as a chracter.
ans is 100n ,101n
| Is This Answer Correct ? | 1 Yes | 3 No |
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 |
1)which of following operator can't be overloaded. a)== b)++ c)?! d)<=
can we print any string in c language without using semicolon(;)(terminator) in whole program.
How to find the usage of memory in a c program
what is ANSI and ISO
What is conio h in c?
what is foreign key in c language?
What does extern mean in a function declaration?
Which built-in library function can be used to match a patter from the string?
How to avoid structure padding in C?
Can a pointer be null?
main() {int i=5; // line 1 i=(++i)/(i++); // line 2 printf("%d",i); // line 3 } output is 2 but if we replace line 2 and line 3 by printf("%d",i=(++i)/(i++)); then output is 1. Why?
print 1-50 with two loop & two print Statement