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 ? | 79 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 |
int a = 10 + 10 .... ,... A = A * A What would be the value of A? The answer is 120!! Could anyone explain this to me.
2 Answers Bosch, eInfochips, HCL, IHCL,
#ifdef something int some=0; #endif main() { int thing = 0; printf("%d %d\n", some ,thing); }
main() { char *cptr,c; void *vptr,v; c=10; v=0; cptr=&c; vptr=&v; printf("%c%v",c,v); }
main() { unsigned int i=65000; while(i++!=0); printf("%d",i); }
Sorting entire link list using selection sort and insertion sort and calculating their time complexity
1 Answers Infosys, Microsoft, NetApp,
#include<stdio.h> void fun(int); int main() { int a; a=3; fun(a); printf("\n"); return 0; } void fun(int i) { if(n>0) { fun(--n); printf("%d",n); fun(--n); } } the answer is 0 1 2 0..someone explain how the code is executed..?
void main() { static int i=i++, j=j++, k=k++; printf(“i = %d j = %d k = %d”, i, j, k); }
main() { int i =0;j=0; if(i && j++) printf("%d..%d",i++,j); printf("%d..%d,i,j); }
void main() { int k=ret(sizeof(float)); printf("\n here value is %d",++k); } int ret(int ret) { ret += 2.5; return(ret); }
#include"math.h" void main() { printf("Hi everybody"); } if <stdio.h> will be included then this program will must compile, but as we know that when we include a header file in "" then any system defined function find its defination from all the directrives. So is this code of segment will compile? If no then why?
main() { char *a = "Hello "; char *b = "World"; clrscr(); printf("%s", strcpy(a,b)); } a. “Hello” b. “Hello World” c. “HelloWorld” d. None of the above
4 Answers Corporate Society, HCL,
Write a program to model an exploding firecracker in the xy plane using a particle system