Aspire's Library

A Place for Latest Exam wise Questions, Videos, Previous Year Papers,
Study Stuff for MCA Examinations - NIMCET

Previous Year Question (PYQs)



What is the output of the following code snippet? int main(){ int i,k=5; if(i=k){ printf("YES"); } else { printf("NO"); } }





Solution

Solution: if(i=k) assigns 5 to i ⇒ condition true ⇒ executes if-block ⇒ prints "YES".
Answer: (B) YES


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More

Ask Your Question or Put Your Review.

loading...