All questions of HP for Interview Preparation Exam

How many times will the print f  be executed? 
main( ) 
unsigned int i=3; 
while( i .=0) 
printf( "%d", i--); 
}
  • a)
    0             
  • b)
    3             
  • c)
    4             
  • d)
    infinite 
Correct answer is option 'D'. Can you explain this answer?

Aarav Sharma answered
The code you provided is incomplete and contains a syntax error. The line `while( i .=0)` is incorrect and should be replaced with a valid condition.

Once the code is corrected, the number of times the `printf` statement will be executed depends on the condition in the while loop.

Chapter doubts & questions for HP - Placement Papers - Technical & HR Questions 2026 is part of Interview Preparation exam preparation. The chapters have been prepared according to the Interview Preparation exam syllabus. The Chapter doubts & questions, notes, tests & MCQs are made for Interview Preparation 2026 Exam. Find important definitions, questions, notes, meanings, examples, exercises, MCQs and online tests here.

Chapter doubts & questions of HP - Placement Papers - Technical & HR Questions in English & Hindi are available as part of Interview Preparation exam. Download more important topics, notes, lectures and mock test series for Interview Preparation Exam by signing up for free.

Top Courses Interview Preparation