दिए गए कोड टुकड़े का आउटपुट क्या है Int F 1 i 2 cout < F while I 5 );

Free

Haryana Police Constable Full Mock Test (Based On 2018 Previous Year Paper)

100 Questions 80 Marks 90 Mins

Concept:

f*=i can also be written as f = f * i and  ++i can also be written as i = i+1.

Calculation:

First step: f = 1 * i = 2 so ++i = 2+1 = 3

3 is less than 5 so f = 2*3  = 6 and ++ i = 3+ 1= 4

Second step: f = 6 * 4 = 24 so ++i = 4+1 = 5

Here  5 < 5 while condition become false. And it printed f as 24. 

So program will print f as 24.

Note:- For better practice and understanding you can simply run the above program and check the output for the correct answer.

Latest Haryana Police Updates

Last updated on Sep 22, 2022

The Haryana Staff Selection Commission (HSSC) has released the final Haryana Police Constable Result for the Male Constable post and the revised final result for the Female Constable post. The result is officially declared by the HSSC for the Advt. No. 04/2020. The HSSC will soon release a new notification for the Haryana Police Constable 2022 too. Candidates who will be 12th pass can apply for the application and appear for the exam. The finally selected candidates will get a salary range between Rs. 21700 to Rs. 69100.

Explore various topics from Computer Awareness here with us. We have hundreds of chapters with detailed explanations to help you elevate your preparation level. Explore Testbook Learn!