void main()
{
int i=5;
printf("%d",i++ + ++i);
}
Answers were Sorted based on User's Feedback
Answer / sachin
ans :11
how?
-> i++ => i=i+1 => i=6;
-> ++i => i=i =>i=5(first assign the value);
i=i+1;
so i++ + ++i=6 + 5=11 i.e.ans
Is This Answer Correct ? | 3 Yes | 31 No |
declare afunction pointer to int printf(char *)?
How can you access memory located at a certain address?
What is c language & why it is used?
Can include files be nested? How many levels deep can include files be nested?
what is call by value and call by reference
What will be result of the following program? void myalloc(char *x, int n) { x= (char *)malloc(n*sizeof(char)); memset(x,\0,n*sizeof(char)); } main() { char *g="String"; myalloc(g,20); strcpy(g,"Oldstring"); printf("The string is %s",g); } a) The string is : String b) Run time error/Core dump c) The string is : Oldstring d) Syntax error during compilation e) None of these
Is there any demerits of using pointer?
What is const keyword in c?
What is the use of define in c?
Do you know the difference between exit() and _exit() function in c?
Explain what is the stack?
What is c method?