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 struct node in c?
Write an implementation of “float stringToFloat(char *str).” The code should be simple, and not require more than the basic operators (if, for, math operators, etc.). • Assumptions • Don’t worry about overflow or underflow • Stop at the 1st invalid character and return the number you have converted till then, if the 1st character is invalid return 0 • Don’t worry about exponential (e.g. 1e10), instead you should treat ‘e’ as an invalid character • Write it like real code, e.g. do error checking • Go though the string only once • Examples • “1.23” should return 1.23 • “1a” should return 1 • “a”should return 0
State the difference between realloc and free.
Write a program to check whether a number is prime or not using c?
How pointer is different from array?
What is c value paradox explain?
What are the two types of structure?
the maximum width of a c variable name can be a) 6 characters b) 8 characters c) 10 characters d) 20 characters
What does calloc stand for?
What is the Difference between Class and Struct?
What is variable in c example?
union { char ch[10]; short s; }test; test.s = 0xabcd; main() { printf("%d",ch[10]); }