void main()
{
int const * p=5;
printf("%d",++(*p));
}
Answers were Sorted based on User's Feedback
Answer / susie
Answer :
Compiler error: Cannot modify a constant value.
Explanation:
p is a pointer to a "constant integer". But we
tried to change the value of the "constant integer".
Is This Answer Correct ? | 78 Yes | 10 No |
Answer / mahe
5
pointer value does not change.so print thier value
Is This Answer Correct ? | 3 Yes | 8 No |
Answer / jambalakadi pamba
here...p is a pointer which is pointing to a addresss which is constant....!!! so the output is 6
Is This Answer Correct ? | 8 Yes | 22 No |
main() { int i=5; printf("%d%d%d%d%d%d",i++,i--,++i,--i,i); }
void main() { int const * p=5; printf("%d",++(*p)); }
3 Answers Infosys, Made Easy, State Bank Of India SBI,
const int perplexed = 2; #define perplexed 3 main() { #ifdef perplexed #undef perplexed #define perplexed 4 #endif printf("%d",perplexed); } a. 0 b. 2 c. 4 d. none of the above
Sorting entire link list using selection sort and insertion sort and calculating their time complexity
1 Answers Infosys, Microsoft, NetApp,
write a c program to Reverse a given string using string function and also without string function
WAP to display 1,2,3,4,5........N
main() { int i = 0xff ; printf("\n%d", i<<2); } a. 4 b. 512 c. 1020 d. 1024
Write a function to find the depth of a binary tree.
13 Answers Adobe, Amazon, EFI, Imagination Technologies,
main() { int i, j; scanf("%d %d"+scanf("%d %d", &i, &j)); printf("%d %d", i, j); } a. Runtime error. b. 0, 0 c. Compile error d. the first two values entered by the user
main() { char *p; p="Hello"; printf("%c\n",*&*p); }
#define assert(cond) if(!(cond)) \ (fprintf(stderr, "assertion failed: %s, file %s, line %d \n",#cond,\ __FILE__,__LINE__), abort()) void main() { int i = 10; if(i==0) assert(i < 100); else printf("This statement becomes else for if in assert macro"); }
main() { int i=0; for(;i++;printf("%d",i)) ; printf("%d",i); }