what is y value of the code if input x=10
y=5;
if (x==10)
else if(x==9)
elae y=8;
a.9
b.8
c.6
d.7
Answer Posted / prakash
I'm getting "error C2181: illegal else without matching if".
If that is corrected then the output will be y = 5.
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)
cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration
which of the following shows the correct hierarchy of arithmetic operations in C a) (), **, * or/,+ or - b) (),**,*,/,+,- c) (),**,/,*,+,- d) (),/ or *,- or +
What language is c written?
What is data type long in c?
What is the maximum no. of arguments that can be given in a command line in C.?
How can I open files mentioned on the command line, and parse option flags?
Is it fine to write void main () or main () in c?
Can you return null in c?
in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none
Which of the following operators is incorrect and why? ( >=, <=, <>, ==)
FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above
List some applications of c programming language?
What are the benefits of c language?
write a program to create a sparse matrix using dynamic memory allocation.