what is the output of below
int n=10;
(n++)++;
printf("%d",n);
Answers were Sorted based on User's Feedback
Answer / kirankumaryakkala
ans. error:Lvalue required
why? Lvalue means leftside assignment value,
here, first it goes to increment on N, again it is going to
increment, before going to increment second time, you should
allocate one varibale that holds the first time increment
value, other wise from where to it increment...
| Is This Answer Correct ? | 11 Yes | 1 No |
Answer / deepak kumar
error : lvalue required.
n++ return 10 and after that n will increase to 1.
so now n=11
but next operation (postfix operator) is performing on
constant value 10 which is returned by (n++) operation.
it actually try to assign 11 to constant value 10. it is not
possible .
firstly we have to store it in a variable and then increment
can take place..
| Is This Answer Correct ? | 9 Yes | 2 No |
how to get the starting address of file stored in harddisk through 'C'program.
Can you explain what keyboard debouncing is, and where and why we us it? please give some examples
void main() { int s[4][2]={ {1234,56},{1212,33},{1434,80},{1312,78} }; int (*p)[2]; int i,j,*pint; for(i=0;i<=3;i++) { p=&s[i]; pint=p; printf("\n"); for(j=0;j<=1;j++) printf("%d",*(pint+j)); } } while running this program it shows a warning-suspicious pointer conversion ie pint=p; my que is why should we assign the value of p to pint again.why cant we use it directly as *(p+j)..but if i use like tat the o/p is garbage value..
Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?
what is default constructor?
difference between semaphores and mutex?
What is s in c?
What is the OOPs concept?
An instruction which is analysed and acted upon by the processor prior to the compiler going its work a) directive b) constructive c) constant d) absolute mode
Explain goto?
Here is a good puzzle: how do you write a program which produces its own source code as output?
write a program using linked list in which each node consists of following information. Name[30] Branch Rollno Telephone no i) Write the program to add information of students in linked list