a=0;
b=(a=0)?2:3;
a) What will be the value of b? why
b) If in 1st stmt a=0 is replaced by -1, b=?
c) If in second stmt a=0 is replaced by -1, b=?
Answer Posted / simply rockz
in ternary operator a condition is required/// like..
<condition1>?<result1>:<result2>
b=(a=0)?2:3
so.. illegal use of ternary.../* "=" is an assignment operator*/
Is This Answer Correct ? | 1 Yes | 5 No |
Post New Answer View All Answers
You are to write your own versions of strcpy() and strlen (). Call them mystrcpy() and mystrlen(). Write them first as code within main(), not as functions, then, convert them to functions. You will pass two arrays to the function in the case of mystrcpy(), the source and target array.
Write a program to print fibonacci series without using recursion?
What is difference between union All statement and Union?
Why & is used in scanf in c?
What are the different types of C instructions?
How can I read a binary data file properly?
What is the purpose of the preprocessor directive error?
Explain how can I remove the trailing spaces from a string?
develop algorithms to add polynomials (i) in one variable
Simplify the program segment if X = B then C ← true else C ← false
Do you know pointer in c?
what is a NULL Pointer? Whether it is same as an uninitialized pointer?
What are the keywords in c?
What are formal parameters?
What are local variables c?