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 / ashwin kumar molugu
a)1st answer will be 3
in statement 1
b)if a=0 replaced with -1 its an error
in statement 2
c)if a=0 replaced with -1 2
answer is 2 becoz -1 is taken as true in c language
| Is This Answer Correct ? | 0 Yes | 4 No |
Post New Answer View All Answers
What is sizeof c?
explain how do you use macro?
Write a program to identify if a given binary tree is balanced or not.
Write a program to print numbers from 1 to 100 without using loop in c?
What is meant by type casting?
what do the 'c' and 'v' in argc and argv stand for?
What is the value of a[3] if integer a[] = {5,4,3,2,1}?
A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers
What is null pointer constant?
Explain what is the concatenation operator?
Why we use void main in c?
what is event driven software and what is procedural driven software?
A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference
What is pointer & why it is used?
What is a program flowchart?