#include<stdio.h>
void main()
{
int i=5;
printf("%d\n",i++ + ++i);
}
this code prints the value as 12 because for 1st i will be taken as 5 and then it is incremented to 6 which is again...
Type: Posts; User: Rohit88
#include<stdio.h>
void main()
{
int i=5;
printf("%d\n",i++ + ++i);
}
this code prints the value as 12 because for 1st i will be taken as 5 and then it is incremented to 6 which is again...
@rags....that was an understatement.
All write guys thanks anyways for your concern.
I am reallly confused.....im only able to make some guess by trying to modify the code in different ways...each time gettin different answers.....as i dont want to put up here my guesswork and be...
@Salem...as you said i went through those concepts...and now i get a bit of those....but im not getting how the expression "
a+=(a+=3,5,a)" is sequenced for evaluation ??
that was great ......thanks everyone :)
#include<stdio.h>
main()
{
float a=.7;
if(a<.7)
printf("abcd");
else
printf("qrst");
}
#include<stdio.h>
main()
{
int a=1;
printf("%d\n",a+=(a+=3,5,a));
}
What happens in the printf statement to print 8 !!!
thanks a lot to each one of you.....your support were sufficient to get over the problem..thanks :)
I apologize for wrongly posting this thread. I have reposted correctly on the link: http://cboard.cprogramming.com/c-programming/144760-need-help-explanation-code.html#post1079856
Thank you...but here say i want the preorder traversal....so in the function printPreorder there is a recursion "printPreorder(node->left)" which calls itself....when i took one example of a...
I apologize for my previous thread i posted on the link:http://cboard.cprogramming.com/c-programming/144753-need-help-explanation-code.html ...this new thread contains the same problem which i...
#include <stdio.h>
#include <stdlib.h>
/* A binary tree node has data, pointer to left child
and a pointer to right child */
struct node
{
int data;
struct node* left;
...
#include <stdio.h>
#include <stdlib.h>
/* A binary tree node has data, pointer to left child
and a pointer to right child */
struct node
{
int data;
struct node* left;
...