Question
Download Solution PDFनिम्नलिखित कोड का आउटपुट क्या है?
int i = 1 ;
while ( i <= 10 )
printf ( "%d\n", i );
Answer (Detailed Solution Below)
Detailed Solution
Download Solution PDFसही विकल्प 4 है
अवधारणा:
यहाँ दिया गया कोड है:
int i = 1;
while (i <= 10)
printf("%d\n", i);
शर्त i <= 10, i = 1 के लिए सत्य है।
printf() कथन चलता है और 1 प्रिंट करता है।
लेकिन लूप के अंदर कोई वृद्धि (i++) नहीं है।
चर i को 1 पर आरंभ किया गया है। जब तक शर्त i <= 10 सत्य है, तब तक while लूप जारी रहता है।
हालांकि, लूप के भीतर कोई भी कथन i के मान को बढ़ाता नहीं है।
इसलिए, i का मान हमेशा 1 ही रहेगा, और शर्त i <= 10 हमेशा सत्य रहेगी, जिससे printf कथन बार-बार निष्पादित होता रहेगा बिना कभी समाप्ति शर्त तक पहुँचे। यह लगातार "1" प्रिंट करेगा जिसके बाद एक नई पंक्ति वर्ण होगा।
Last updated on Jun 7, 2025
-> RRB JE CBT 2 answer key 2025 for June 4 exam has been released at the official website.
-> Check Your Marks via RRB JE CBT 2 Rank Calculator 2025
-> RRB JE CBT 2 admit card 2025 has been released.
-> RRB JE CBT 2 city intimation slip 2025 for June 4 exam has been released at the official website.
-> RRB JE CBT 2 Cancelled Shift Exam 2025 will be conducted on June 4, 2025 in offline mode.
-> RRB JE CBT 2 Exam Analysis 2025 is Out, Candidates analysis their exam according to Shift 1 and 2 Questions and Answers.
-> The RRB JE Notification 2024 was released for 7951 vacancies for various posts of Junior Engineer, Depot Material Superintendent, Chemical & Metallurgical Assistant, Chemical Supervisor (Research) and Metallurgical Supervisor (Research).
-> The selection process includes CBT 1, CBT 2, and Document Verification & Medical Test.
-> The candidates who will be selected will get an approximate salary range between Rs. 13,500 to Rs. 38,425.
-> Attempt RRB JE Free Current Affairs Mock Test here
-> Enhance your preparation with the RRB JE Previous Year Papers.