Thank you people
Type: Posts; User: devilofwar
Thank you people
#include <stdio.h>
int main()
{
int t;
t= func(5);
printf("Hello world!\n %d",t);
return 0;
}
and j + 11 wont have an effect on the stmts that follow . Right ? cause its not modifying anything
sorry
now answer the question
i>j?i=10;j+=11
Here we get an L value error since C treats this as (i>j?i=10;j) +=10
thats OK
BUT
if this is the case
i>j?i=10;j(operator with higher precedence than cond)11;
what will...
oh So thats the difference ..
Thanks a lot
i think the evaluation i=10 will return true ie 1
hey can anyone explain me the behavior of
printf("%d", i=10);
should it not print 1 ?
in this case i =-2 j= 2 and k= 1
and yes the link provided above was helpful !!
but here why is && not evaluated before the || operator ? should the && be evaluated and then ||
even i thought of this explanation But have u considered the fact that && gets evaluated first and then || gets evaluated
Precedence table frm anywhere says this
even i thought of this explanation But have u considered the fact that && gets evaluated first and then || gets evaluated
Precedence table frm anywhere says this
no ur wrong cause the ans will depend on the evaluation order of this stmt which is unclear to me
int main(){
int i = -3,j=2,k=0,m;
m=++i||++j&&++k;
printf("%d%d%d%d",i,j,k,m);
return 0;
}
the ans is -2 2 0 1
thank you :::DDD
As we know that the nature of the expression
a[i]=i++; is undefined. Ref K&R
What is the nature of
i+=i++;
will this be undefined ?
Thanx a lot guys
And can anyone guide me to some good MCQ book or online resource.
Q's related to 'Whats the output'
r u having a 16 bit compiler?
Hey all
Can anyone suggest me some material (Advanced level) which contains many Multiple choice Q's on outputs or concepts (in C) or even MCQ's on Data structures using C.
Also
O/p
...
thanx a lot
saw this code somewhere
int i=1022/3>>2;
printf("%d",i);
now what will be the output