main()
{
intx=2,y=6,z=6;
x=y=z;
printf(%d",x)
}
Answers were Sorted based on User's Feedback
Answer / sorab
error becoz in program written as printf(%d",x)
actually it written like that printf("%d",x);
then the value 6 is print on screen
thanks ....
| Is This Answer Correct ? | 36 Yes | 7 No |
Answer / krs
"intx=2" must be "int x=2".This is First error.
secondly there is a syntax error in printf();
So there is compile time error due to this code execution.
| Is This Answer Correct ? | 14 Yes | 1 No |
Answer / dhananjay
x=6 beacuse x will contain the latest value.
| Is This Answer Correct ? | 21 Yes | 14 No |
Answer / nithya
output:
undefined symbol 'intx'
undefined symbol 'y'
undefined symbol 'z'
syntax error 'printf(%d",x)'
the above code will be change
main()
{
int x=2,y=6,z=6;
x=y=z;
printf("%d",x);
}
output:
warning error:y assign value not used
6
| Is This Answer Correct ? | 5 Yes | 0 No |
what is the flow of execution in cprogram? ex:printf();,scanf();
What is the best way of making my program efficient?
Is printf a keyword?
what is the value of 'i'? i=strlen("Blue")+strlen("People")/strlen("Red")-strlen("green")
7 Answers Cadence, JNTU, Zen Technologies,
Who had beaten up hooligan "CHAKULI" in his early college days?
when will be evaluated as true/ if(x==x==x) a) x=1; b) x=0; c) x=-1; d) none
int main() { int *p=new int; *p=10; del p; cout<<*p; *p= 60; cout<<*p; } what will be the output & why?
Is it acceptable to declare/define a variable in a c header?
Are bit fields portable?
int far *near * p; means
what is void pointer?
Is there any possibility to create customized header file with c programming language?