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


Please Help Members By Posting Answers For Below Questions

How do we make a global variable accessible across files? Explain the extern keyword?

1407


What is fflush() function?

631


What do you mean by c?

574


write a programming in c to find the sum of all elements in an array through function.

1696


Explain bitwise shift operators?

621






How do we print only part of a string in c?

577


What is the method to save data in stack data structure type?

595


What does the characters “r” and “w” mean when writing programs that will make use of files?

841


What are pointers? What are different types of pointers?

616


What is a string?

657


Explain how do you determine whether to use a stream function or a low-level function?

616


What are all different types of pointers in c?

566


Describe how arrays can be passed to a user defined function

771


What is c language and why we use it?

606


what are the facialities provided by you after the selection of the student.

1648