[C Programming MCQS ]

झारखंड में आयोजित होने वाली JPSC, JSSC, JET, झारखंड पुलिस भर्ती परीक्षा आदि के लिए उपयोगी सामान्य अध्ययन।

[ C Programming MCQS ]

Useful GK for JPSC, JSSC, JET, Jharkhand Police and other exams.
71. दिए गए Program का Output क्या होगा?
[A] 12, 144
[B] 13, 144
[C] 13, 0
[D] None of these
71. Study the following program. What will be the output?
[A] 12, 144
[B] 13, 144
[C] 13, 0
[D] None of these
सही उत्तर: None of these
व्याख्या: ptr को Initialize नहीं किया गया है। *ptr पर लिखने से Undefined Behavior होता है।
Correct Answer: None of these
Explanation: The pointer is uninitialized, so dereferencing it causes undefined behavior.
72. दिए गए Switch Program का Output क्या होगा?
[A] Three
[B] Three Five Odd
[C] Three Five Seven Odd
[D] Three Five Seven
72. What will be the output of the above program?
[A] Three
[B] Three Five Odd
[C] Three Five Seven Odd
[D] Three Five Seven
सही उत्तर: Three Five Seven Odd
व्याख्या: Case 3 से Execution शुरू होकर Break न होने के कारण सभी अगले Cases तथा Default Execute होंगे।
Correct Answer: Three Five Seven Odd
Explanation: Execution falls through from case 3 to case 5, case 7 and default.
73. दिए गए Union Program का Output क्या होगा?
[A] 8
[B] 6
[C] 10
[D] 14
73. What will be the output of this program?
[A] 8
[B] 6
[C] 10
[D] 14
सही उत्तर: 8
व्याख्या: Union का Size उसके सबसे बड़े Member के Size के बराबर होता है। double सामान्यतः 8 bytes का होता है।
Correct Answer: 8
Explanation: The size of a union equals the size of its largest member, which is double (8 bytes).
74. दिए गए Program में X का मान क्या होगा?
[A] X=4
[B] X=20
[C] X=25
[D] X=10
74. What will be the output of this program?
[A] X=4
[B] X=20
[C] X=25
[D] X=10
सही उत्तर: X=4
व्याख्या: i = 0,5,10,15 पर X बढ़ता है, इसलिए X का अंतिम मान 4 होगा।
Correct Answer: X=4
Explanation: X is incremented when i is 0, 5, 10 and 15, so the final value is 4.
75. दिए गए Program का Output क्या होगा?
[A] X=30
[B] X=20
[C] X=25
[D] X=10
75. What will be the output of the above program?
[A] X=30
[B] X=20
[C] X=25
[D] X=10
सही उत्तर: X=30
व्याख्या: i=0,5,10,15 पर X में जोड़ होता है: 0+5+10+15=30।
Correct Answer: X=30
Explanation: The values 0, 5, 10 and 15 are added, resulting in X=30.
76. Pre-programming Technique कौन-कौन सी हैं?
[A] Flow Chart
[B] Algorithm
[C] Dry Run
[D] All of Above
76. Pre-programming technique is?
[A] Flow Chart
[B] Algorithm
[C] Dry Run
[D] All of Above
सही उत्तर: All of Above
व्याख्या: Program बनाने से पहले Algorithm, Flowchart तथा Dry Run का उपयोग किया जाता है।
Correct Answer: All of Above
Explanation: Algorithm, Flowchart and Dry Run are pre-programming techniques.
77. Program Creation का Step by Step Representation क्या कहलाता है?
[A] Algorithm
[B] Flow Chart
[C] Dry Run
[D] None of Above
77. Which is the step by step representation of program creation?
[A] Algorithm
[B] Flow Chart
[C] Dry Run
[D] None of Above
सही उत्तर: Algorithm
व्याख्या: Algorithm किसी समस्या के समाधान के चरणबद्ध निर्देश होते हैं।
Correct Answer: Algorithm
Explanation: An algorithm is the step-by-step representation of program creation.
78. Dry Run क्या है?
[A] Tabular Development
[B] Graphical Representation
[C] Step by Step Development
[D] None of Above
78. Dry Run is a __________.
[A] Tabular Development
[B] Graphical Representation
[C] Step by Step Development
[D] None of Above
सही उत्तर: Tabular Development
व्याख्या: Dry Run में Program Execution को Table के रूप में प्रदर्शित किया जाता है।
Correct Answer: Tabular Development
Explanation: Dry Run is a tabular representation used to trace program execution.
79. B भाषा का विकास किसने किया?
[A] Martin Richards
[B] Dennis Ritchie
[C] Ken Thompson
[D] Brian Kernighan
79. B language is developed by ___________.
[A] Martin Richards
[B] Dennis Ritchie
[C] Ken Thompson
[D] Brian Kernighan
सही उत्तर: Ken Thompson
व्याख्या: B Programming Language का विकास Ken Thompson ने किया था।
Correct Answer: Ken Thompson
Explanation: The B programming language was developed by Ken Thompson.
80. Single Line Comment के लिए कौन-सा Symbol उपयोग होता है?
[A] //
[B] /* ...... */
[C] \\
[D] ;
80. Which of the following symbol is used for single line comment?
[A] //
[B] /* ...... */
[C] \\
[D] ;
सही उत्तर: //
व्याख्या: C99 और उसके बाद Single Line Comment के लिए // का उपयोग किया जाता है।
Correct Answer: //
Explanation: // is used for single-line comments in C.