Expressions on C related Questions and Answers

Question 1 : Which of the following is the correct order if calling functions in the below code?
a = f1(23, 14) * f2(12/4) + f3();
1. f1, f2, f3
2. f3, f2, f1
3. Order may vary from compiler to compiler
4. None of above
View Answer   Discuss with Members

Question 2 : Which of the following is the correct usage of conditional operators used in C?
1. a>b ? c=30 : c=40;
2. a>b ? c=30;
3. max = a>b ? a>c?a:c:b>c?b:c
4. return (a>b)?(a:b)
View Answer   Discuss with Members

Question 3 : Which of the following correctly shows the hierarchy of arithmetic operations in C?
1. / + * -
2. * - / +
3. + - / *
4. / * + -
View Answer   Discuss with Members

Question 4 : Which of the following is the correct order of evaluation for the below expression?
z = x + y * z / 4 % 2 - 1
1. * / % + - =
2. = * / % + -
3. / * % - + =
4. * % / - + =
View Answer   Discuss with Members


View 1 - 4 of 4 Questions

* Be the First to Post a Comment.

Submit comment :


Captcha Image
Reload

Ask Question

Captcha Image
Reload

Note : Name and Email never shown.





Subscribe


Become a part of EducationForever. Subscribe to our FREE Newsletter