Connection restored!
Notification Center
Loading notifications...
Loading announcements...
INCOMING 1v1 DUEL! 10:00
@friend challenged you!
Topic · Room #HQ-0000
Accept & Join
Mention Scholar ↑↓ Enter / Click
Last time you were studying on Page 2.
STUDY & LEARNING DECK

Programming Languages

Showing 25 of 400 total questions (Latest Added First).

Timed Quiz
Newest Classic 25 Qs
No Questions Match Your Filter

Try clearing filters or unchecking "Saved" / "Hide".

Question 176 NEW
📜 PYQs MEDIUM
In C, what is the main difference between a `struct` (Structure) and a `union`?
C भाषा में `struct` (स्ट्रक्चर) और `union` (यूनियन) के बीच मुख्य अंतर क्या है?
A
Structures can only store integers
स्ट्रक्चर केवल पूर्णांक स्टोर कर सकते हैं
B
In a `struct`, every member gets its own separate memory space; in a `union`, all members SHARE the exact same memory location (size equals the largest member)
`struct` में हर सदस्य को अलग मेमोरी मिलती है, जबकि `union` में सभी सदस्य एक ही मेमोरी स्थान साझा करते हैं (आकार सबसे बड़े सदस्य के बराबर होता है)
Correct
C
Unions are not supported in C
C में यूनियन सपोर्ट नहीं होता
D
Both allocate the exact same amount of memory
दोनों बिल्कुल समान मेमोरी लेते हैं
Solution Breakdown:
-> Because union members share memory, only ONE member of a union can hold a valid value at a given time, saving RAM in memory-constrained systems. -> Hence, Option (B) is the correct answer.
-> यूनियन में सभी सदस्य एक ही मेमोरी साझा करते हैं, इसलिए एक समय में केवल एक ही सदस्य का मान सक्रिय रहता है। -> इसलिए विकल्प (B) बिल्कुल सही है।
Question 177 NEW
📜 PYQs MEDIUM
If an `int` takes 2 bytes in memory, what is the total size of the 2D C array `int arr[3][4];`?
यदि एक `int` मेमोरी में 2 बाइट्स लेता है, तो 2D C एरे `int arr[3][4];` का कुल आकार क्या होगा?
A
24 bytes
24 बाइट्स
Correct
B
12 bytes
12 बाइट्स
C
14 bytes
14 बाइट्स
D
7 bytes
7 बाइट्स
Solution Breakdown:
-> Total elements in `arr[3][4]` = $3 \times 4 = 12$ integers. Total size = $12 \times 2\text{ bytes} = 24\text{ bytes}$. -> Hence, Option (A) is the correct answer.
-> कुल तत्व $= 3 \times 4 = 12$ और कुल मेमोरी $= 12 \times 2 = 24\text{ बाइट्स}$। -> इसलिए विकल्प (A) बिल्कुल सही है।
Question 178 NEW
📜 PYQs MEDIUM
What is the total memory size (in bytes) of the following C string array declaration: `char name[] = "abcde";` (assuming 1 char = 1 byte)?
C में `char name[] = "abcde";` की कुल मेमोरी साइज़ (बाइट्स में) क्या होगी (यदि 1 अक्षर = 1 बाइट)?
A
4 bytes
4 बाइट्स
B
5 bytes
5 बाइट्स
C
7 bytes
7 बाइट्स
D
6 bytes
6 बाइट्स
Correct
Solution Breakdown:
-> In C, every string literal automatically ends with a hidden Null Terminator character (`\0`) taking 1 extra byte. Thus, 5 letters (`a,b,c,d,e`) + 1 null character (`\0`) = 6 bytes. -> Hence, Option (D) is the correct answer.
-> C में हर स्ट्रिंग के अंत में एक नल कैरेक्टर (`\0`) अपने आप जुड़ता है, इसलिए 5 अक्षर + 1 नल कैरेक्टर = 6 बाइट्स। -> इसलिए विकल्प (D) बिल्कुल सही है।
Question 179 NEW
📜 PYQs EASY
What is the correct way to declare an integer constant `size` with value `10` in C?
C भाषा में `10` मान वाले पूर्णांक कॉन्स्टेंट `size` को घोषित करने का सही तरीका क्या है?
A
`const size = 10;`
`const size = 10;`
B
`constant int size = 10;`
`constant int size = 10;`
C
`const int size = 10;`
`const int size = 10;`
Correct
D
`int const = 10;`
`int const = 10;`
Solution Breakdown:
-> Placing the `const` keyword before the data type (`const int size = 10;`) makes the variable read-only so its value cannot be altered later. -> Hence, Option (C) is the correct answer.
-> `const` कीवर्ड के साथ डेटा टाइप और शुरुआती मान देकर कॉन्स्टेंट बनाया जाता है। -> इसलिए विकल्प (C) बिल्कुल सही है।
Question 180 NEW
📜 PYQs EASY
Which of the following is the correct declaration of a 2-Dimensional (double-dimensioned) integer array in C?
C भाषा में 2-डायमेंशनल पूर्णांक एरे की सही घोषणा कौन सी है?
A
`int arr[2, 2];`
`int arr[2, 2];`
B
`int arr[2][2];`
`int arr[2][2];`
Correct
C
`int arr(2)(2);`
`int arr(2)(2);`
D
`int *arr[10];`
`int *arr[10];`
Solution Breakdown:
-> A 2D array in C uses two separate pairs of square brackets for rows and columns: `int arr[rows][cols];`. -> Hence, Option (B) is the correct answer.
-> 2D एरे में रो और कॉलम के लिए दो अलग-अलग स्क्वायर ब्रैकेट `[2][2]` लगाए जाते हैं। -> इसलिए विकल्प (B) बिल्कुल सही है।
Question 181 NEW
📜 PYQs EASY
Which of the following is the correct way to declare a 10-element integer array named `marks` in C?
C भाषा में `marks` नामक 10-तत्वों वाले पूर्णांक एरे की सही घोषणा कौन सी है?
A
`int marks[10];`
`int marks[10];`
Correct
B
`int marks(10);`
`int marks(10);`
C
`int marks{10};`
`int marks{10};`
D
`array int marks[10];`
`array int marks[10];`
Solution Breakdown:
-> In C, arrays are declared using square brackets `[ ]` specifying the size: `data_type array_name[size];`. -> Hence, Option (A) is the correct answer.
-> C में एरे घोषित करने के लिए स्क्वायर ब्रैकेट `[ ]` का उपयोग किया जाता है। -> इसलिए विकल्प (A) बिल्कुल सही है।
Question 182 NEW
📜 PYQs EASY
Which keyword is used in C to define a function that returns NO value?
C भाषा में ऐसा फंक्शन परिभाषित करने के लिए जो कोई मान रिटर्न नहीं करता, किस कीवर्ड का उपयोग किया जाता है?
A
`null`
`null`
B
`empty`
`empty`
C
`none`
`none`
D
`void`
`void`
Correct
Solution Breakdown:
-> `void` is an empty data type keyword used as a function return type (e.g., `void display()`) when no value needs to be returned to the caller. -> Hence, Option (D) is the correct answer.
-> जब किसी फंक्शन को कोई मान वापस नहीं लौटाना होता, तो उसका रिटर्न टाइप `void` रखा जाता है। -> इसलिए विकल्प (D) बिल्कुल सही है।
Question 183 NEW
📜 PYQs EASY
By default, how are arguments passed to functions in the C programming language?
C प्रोग्रामिंग भाषा में डिफ़ॉल्ट रूप से फंक्शंस में आर्ग्युमेंट्स कैसे पास किए जाते हैं?
A
Call by Reference
कॉल बाय रेफरेंस
B
Call by Address
कॉल बाय एड्रेस
C
Call by Value
कॉल बाय वैल्यू
Correct
D
Call by Name
कॉल बाय नेम
Solution Breakdown:
-> C always passes arguments by Value by default (sending a copy). Call by Reference is simulated in C by explicitly passing memory addresses using pointers. -> Hence, Option (C) is the correct answer.
-> C में डिफ़ॉल्ट रूप से कॉल बाय वैल्यू का उपयोग होता है; कॉल बाय रेफरेंस के लिए पॉइंटर्स (`&` और `*`) का उपयोग करना पड़ता है। -> इसलिए विकल्प (C) बिल्कुल सही है।
Question 184 NEW
📜 PYQs EASY
Which standard library function in C is used to close an opened file?
C भाषा में किसी खुली हुई फाइल को बंद करने के लिए किस मानक लाइब्रेरी फंक्शन का उपयोग किया जाता है?
A
`closefile()`
`closefile()`
B
`fclose()`
`fclose()`
Correct
C
`fileclose()`
`fileclose()`
D
`closef()`
`closef()`
Solution Breakdown:
-> In C file handling (`stdio.h`), `fopen()` opens a file and `fclose(fp)` flushes buffers and safely closes the file pointer `fp`. -> Hence, Option (B) is the correct answer.
-> C में फाइल खोलने के लिए `fopen()` और बंद करने के लिए `fclose()` फंक्शन का उपयोग किया जाता है। -> इसलिए विकल्प (B) बिल्कुल सही है।
Question 185 NEW
📜 PYQs MEDIUM
In C, if a variable is declared with the `register` storage class, which operator CANNOT be applied to it?
C भाषा में, यदि किसी वेरिएबल को `register` स्टोरेज क्लास के साथ घोषित किया गया है, तो उस पर कौन सा ऑपरेटर लागू नहीं किया जा सकता?
A
Address-of operator (`&`)
एड्रेस-ऑफ ऑपरेटर (`&`)
Correct
B
Increment operator (`++`)
इंक्रीमेंट ऑपरेटर (`++`)
C
Addition operator (`+`)
जोड़ ऑपरेटर (`+`)
D
Logical NOT (`!`)
लॉजिकल NOT (`!`)
Solution Breakdown:
-> A `register` variable is requested to be stored directly inside a CPU register instead of RAM, and CPU registers do not have RAM memory addresses, so `&` is invalid. -> Hence, Option (A) is the correct answer.
-> `register` वेरिएबल RAM के बजाय CPU रजिस्टर में स्टोर होता है जिसका कोई RAM एड्रेस नहीं होता, इसलिए इस पर `&` ऑपरेटर नहीं लगाया जा सकता। -> इसलिए विकल्प (A) बिल्कुल सही है।
Question 186 NEW
📜 PYQs MEDIUM
What is the default storage class for all local variables declared inside a function in C?
C भाषा में किसी फंक्शन के अंदर घोषित सभी लोकल वेरिएबल्स की डिफ़ॉल्ट स्टोरेज क्लास क्या होती है?
A
`static`
`static`
B
`extern`
`extern`
C
`register`
`register`
D
`auto`
`auto`
Correct
Solution Breakdown:
-> `auto` (automatic) is the default storage class for local variables; they are created automatically when the function begins and destroyed when it exits. -> Hence, Option (D) is the correct answer.
-> लोकल वेरिएबल्स की डिफ़ॉल्ट स्टोरेज क्लास `auto` होती है। -> इसलिए विकल्प (D) बिल्कुल सही है।
Question 187 NEW
📜 PYQs MEDIUM
Which storage class in C allows a local variable to RETAIN its value between multiple calls to the same function?
C भाषा में कौन सी स्टोरेज क्लास किसी लोकल वेरिएबल को एक ही फंक्शन के कई कॉल्स के बीच अपना मान सुरक्षित रखने की अनुमति देती है?
A
`auto`
`auto`
B
`register`
`register`
C
`static`
`static`
Correct
D
`extern`
`extern`
Solution Breakdown:
-> A `static` local variable is initialized only once and stays alive in memory until the end of the entire program, retaining its updated value across function calls. -> Hence, Option (C) is the correct answer.
-> `static` लोकल वेरिएबल केवल एक बार इनिशियलाइज़ होता है और पूरे प्रोग्राम के अंत तक मेमोरी में अपना मान बनाए रखता है। -> इसलिए विकल्प (C) बिल्कुल सही है।
Question 188 NEW
📜 PYQs MEDIUM
If `X`, `Y`, and `Z` are pointer variables of type `char*`, `int*`, and `float*` respectively on the same C system, what is true about their memory sizes?
यदि एक ही C सिस्टम पर `X`, `Y` और `Z` क्रमशः `char*`, `int*` और `float*` प्रकार के पॉइंटर वेरिएबल हैं, तो उनके मेमोरी आकार के बारे में क्या सत्य है?
A
`Z` is larger than `X`
`Z` का आकार `X` से बड़ा है
B
All three pointers (`X`, `Y`, and `Z`) have the exact SAME memory size
तीनों पॉइंटर्स (`X`, `Y` और `Z`) का मेमोरी आकार बिल्कुल समान होता है
Correct
C
`Y` is larger than `X`
`Y` का आकार `X` से बड़ा है
D
`X` takes only 1 byte
`X` केवल 1 बाइट लेता है
Solution Breakdown:
-> Every pointer stores a memory address (not the actual data), so on a 32-bit system all pointers take 4 bytes and on a 64-bit system all pointers take 8 bytes regardless of data type. -> Hence, Option (B) is the correct answer.
-> हर पॉइंटर केवल मेमोरी एड्रेस स्टोर करता है, इसलिए डेटा टाइप कुछ भी हो, सभी पॉइंटर्स का आकार समान होता है। -> इसलिए विकल्प (B) बिल्कुल सही है।
Question 189 NEW
📜 PYQs EASY
Which of the following is the correct declaration of an integer pointer variable `p` in C?
C भाषा में पूर्णांक पॉइंटर वेरिएबल `p` की सही घोषणा निम्नलिखित में से कौन सी है?
A
`int *p;`
`int *p;`
Correct
B
`int &p;`
`int &p;`
C
`int p;`
`int p;`
D
`pointer int p;`
`pointer int p;`
Solution Breakdown:
-> Placing an asterisk (`*`) between the data type and variable name declares a pointer (`int *p;` means `p` is a pointer to an `int`). -> Hence, Option (A) is the correct answer.
-> डेटा टाइप के बाद `*` लगाकर पॉइंटर घोषित किया जाता है, जैसे `int *p;`। -> इसलिए विकल्प (A) बिल्कुल सही है।
Question 190 NEW
📜 PYQs EASY
What is a "Pointer" variable in C programming used to store?
C प्रोग्रामिंग में "पॉइंटर" वेरिएबल का उपयोग क्या स्टोर करने के लिए किया जाता है?
A
Only decimal values
केवल दशमलव मान
B
Only string text
केवल स्ट्रिंग टेक्स्ट
C
The name of a function
किसी फंक्शन का नाम
D
The memory address of another variable
किसी अन्य वेरिएबल का मेमोरी एड्रेस
Correct
Solution Breakdown:
-> A pointer variable (declared with `*`, such as `int *p;`) holds the memory address of another variable of the same data type. -> Hence, Option (D) is the correct answer.
-> पॉइंटर एक विशेष वेरिएबल है जो किसी दूसरे वेरिएबल का मेमोरी एड्रेस स्टोर करता है। -> इसलिए विकल्प (D) बिल्कुल सही है।
Question 191 NEW
📜 PYQs EASY
Which operator is used as the "Address-of" operator in C to obtain the memory address of a variable?
C भाषा में किसी वेरिएबल का मेमोरी एड्रेस प्राप्त करने के लिए किस ऑपरेटर का उपयोग किया जाता है?
A
`*`
`*`
B
`%`
`%`
C
`&`
`&`
Correct
D
`/`
`/`
Solution Breakdown:
-> The Ampersand (`&`) returns the RAM address of a variable (e.g., `&x` in `scanf("%d", &x)`), whereas `*` is the dereference (indirection) operator. -> Hence, Option (C) is the correct answer.
-> एम्परसैंड (`&`) ऑपरेटर किसी वेरिएबल का मेमोरी एड्रेस देता है, जिसका उपयोग `scanf()` और पॉइंटर्स में होता है। -> इसलिए विकल्प (C) बिल्कुल सही है।
Question 192 NEW
📜 PYQs EASY
Which operator is used in C to find the storage size (in bytes) of a data type or variable at compile time?
C भाषा में किसी डेटा टाइप या वेरिएबल का मेमोरी आकार (बाइट्स में) ज्ञात करने के लिए किस ऑपरेटर का उपयोग किया जाता है?
A
`length()`
`length()`
B
`sizeof`
`sizeof`
Correct
C
`count()`
`count()`
D
`typedef`
`typedef`
Solution Breakdown:
-> `sizeof` is a compile-time unary operator in C that returns the exact memory size in bytes allocated to a data type or variable (e.g., `sizeof(int)`). -> Hence, Option (B) is the correct answer.
-> `sizeof` एक कंपाइल-टाइम यूनरी ऑपरेटर है जो किसी डेटा टाइप या वेरिएबल द्वारा घेरी गई मेमोरी को बाइट्स में बताता है। -> इसलिए विकल्प (B) बिल्कुल सही है।
Question 193 NEW
📜 PYQs EASY
Which character is NOT allowed inside a variable name in C?
C भाषा में किसी वेरिएबल के नाम के अंदर किस प्रकार का कैरेक्टर वर्जित है?
A
White space characters (such as space or tab)
व्हाइट स्पेस कैरेक्टर (जैसे स्पेस या टैब)
Correct
B
Alphabets (`A-Z`, `a-z`)
अंग्रेजी अक्षर (`A-Z`, `a-z`)
C
Underscore (`_`)
अंडरस्कोर (`_`)
D
Digits (`0-9`, after the first character)
अंक (`0-9`, पहले अक्षर के बाद)
Solution Breakdown:
-> C variable names can contain letters, digits, and underscores (must not start with a digit), and spaces or special symbols like `@` or `-` are strictly prohibited. -> Hence, Option (A) is the correct answer.
-> C वेरिएबल नाम में स्पेस या विशेष चिह्नों (अंडरस्कोर को छोड़कर) का उपयोग नहीं किया जा सकता। -> इसलिए विकल्प (A) बिल्कुल सही है।
Question 194 NEW
📜 PYQs EASY
Which of the following is NOT a type of loop in the C programming language?
निम्नलिखित में से कौन सा C प्रोग्रामिंग भाषा में लूप का प्रकार नहीं है?
A
`for`
`for`
B
`while`
`while`
C
`do-while`
`do-while`
D
`if-else`
`if-else`
Correct
Solution Breakdown:
-> C provides three loops: `for`, `while`, and `do-while`. `if-else` is a conditional branching statement, not a loop. -> Hence, Option (D) is the correct answer.
-> C में तीन लूप होते हैं (`for`, `while`, `do-while`), जबकि `if-else` निर्णय लेने का कंडीशनल स्टेटमेंट है। -> इसलिए विकल्प (D) बिल्कुल सही है।
Question 195 NEW
📜 PYQs EASY
Which preprocessor directive is used to insert pre-written header file code (such as `stdio.h`) into a C program?
किसी C प्रोग्राम में पहले से लिखे गए हेडर फाइल कोड को शामिल करने के लिए किस प्रीप्रोसेसर डायरेक्टिव का उपयोग किया जाता है?
A
`#read`
`#read`
B
`#get`
`#get`
C
`#include`
`#include`
Correct
D
`#put`
`#put`
Solution Breakdown:
-> `#include <stdio.h>` tells the C preprocessor to copy the contents of the Standard Input/Output header file into the program so functions like `printf()` and `scanf()` can be used. -> Hence, Option (C) is the correct answer.
-> `#include` प्रीप्रोसेसर को निर्देश देता है कि वह संबंधित हेडर फाइल का कोड प्रोग्राम में शामिल करे। -> इसलिए विकल्प (C) बिल्कुल सही है।
Question 196 NEW
📜 PYQs EASY
All Preprocessor directives (such as `include` and `define`) in a C program must begin with which symbol?
C प्रोग्राम में सभी प्रीप्रोसेसर डायरेक्टिव्स किस प्रतीक से शुरू होते हैं?
A
`&`
`&`
B
`#`
`#`
Correct
C
`$`
`$`
D
`@`
`@`
Solution Breakdown:
-> Preprocessor commands start with `#` (e.g., `#include <stdio.h>` or `#define PI 3.14`) and do not end with a semicolon. They are processed before actual compilation begins. -> Hence, Option (B) is the correct answer.
-> प्रीप्रोसेसर कमांड `#` से शुरू होते हैं और कंपाइलेशन शुरू होने से पहले ही प्रोसेस कर लिए जाते हैं। -> इसलिए विकल्प (B) बिल्कुल सही है।
Question 197 NEW
📜 PYQs EASY
In C programming, every executable statement MUST be terminated by which symbol?
C प्रोग्रामिंग में प्रत्येक निष्पादन योग्य स्टेटमेंट को किस चिह्न से समाप्त किया जाता है?
A
Semicolon (`;`)
सेमीकोलन (`;`)
Correct
B
Comma (`,`)
कॉमा (`,`)
C
Colon (`:`)
कोलन (`:`)
D
Period (`.`)
डॉट (`.`)
Solution Breakdown:
-> The semicolon (`;`) acts as the statement terminator in C, C++, and Java. Missing a semicolon results in a compile-time Syntax Error. -> Hence, Option (A) is the correct answer.
-> C भाषा में हर स्टेटमेंट के अंत में सेमीकोलन (`;`) लगाना अनिवार्य है, वरना कंपाइल-टाइम सिंटैक्स एरर आता है। -> इसलिए विकल्प (A) बिल्कुल सही है।
Question 198 NEW
📜 PYQs EASY
Which of the following is NOT a valid keyword in the C programming language?
निम्नलिखित में से कौन सा C प्रोग्रामिंग भाषा में एक वैध कीवर्ड नहीं है?
A
`auto`
`auto`
B
`enum`
`enum`
C
`register`
`register`
D
`myfile`
`myfile`
Correct
Solution Breakdown:
-> `auto`, `enum`, and `register` are all part of the 32 standard C keywords, whereas `myfile` is a user-defined identifier, not a keyword. -> Hence, Option (D) is the correct answer.
-> `auto`, `enum` और `register` C के मानक कीवर्ड्स हैं, जबकि `myfile` कोई कीवर्ड नहीं है। -> इसलिए विकल्प (D) बिल्कुल सही है।
Question 199 NEW
📜 PYQs EASY
How many total reserved keywords are available in standard ANSI C (C89/C90)?
मानक ANSI C में कुल कितने आरक्षित कीवर्ड्स (Keywords) उपलब्ध हैं?
A
24
24
B
28
28
C
32
32
Correct
D
48
48
Solution Breakdown:
-> Standard ANSI C contains exactly 32 reserved keywords (such as `auto`, `break`, `case`, `char`, `const`, `int`, `return`, `struct`, `void`, `while`). -> Hence, Option (C) is the correct answer.
-> मानक ANSI C में कुल 32 कीवर्ड्स होते हैं जिनका अर्थ पहले से निश्चित है और इन्हें वेरिएबल के नाम के रूप में उपयोग नहीं किया जा सकता। -> इसलिए विकल्प (C) बिल्कुल सही है।
Question 200 NEW
📜 PYQs EASY
Who developed the C programming language in 1972 at AT&T Bell Laboratories?
1972 में AT&T बेल लैबोरेटरीज़ में C प्रोग्रामिंग भाषा का विकास किसने किया था?
A
James Gosling
जेम्स गोसलिंग
B
Dennis Ritchie
डेनिस रिची
Correct
C
Bjarne Stroustrup
ब्योर्न स्ट्राउस्ट्रप
D
Guido van Rossum
गुइडो वैन रोसुम
Solution Breakdown:
-> The C programming language was developed by Dennis Ritchie in 1972 at Bell Laboratories, primarily to build the UNIX operating system. -> Because C combines high-level readability with low-level memory access, it is often called a middle-level language. -> Hence, Option (B) is the correct answer.
-> C प्रोग्रामिंग भाषा का विकास 1972 में डेनिस रिची द्वारा बेल लैब्स में किया गया था, जिसका मुख्य उद्देश्य UNIX ऑपरेटिंग सिस्टम बनाना था। -> चूंकि C में हाई-लेवल की सरलता और लो-लेवल की मेमोरी क्षमता दोनों हैं, इसलिए इसे मिडिल-लेवल भाषा भी कहा जाता है। -> इसलिए विकल्प (B) बिल्कुल सही है।
Prev 6 7 8 9 10 Next
ESSENTIAL STUDY KIT

Master Programming Languages Faster with Recommended Resources

Pair your daily MCQ practice with these educator-picked books, practice sets, and typing gear tailored for this syllabus.

Visit Exam Store
Dell KB216 Wired Multimedia USB Keyboard (Black)
Typing Keyboards Best for Mangal Typing Amazon
Dell KB216 Wired Multimedia USB Keyboard (Black)

Soft chiclet keys and zero lag — the best keyboard for UPP Computer Operator and DSSSB 40+ WPM Hindi/English typing tests.

₹299 ₹999 70% OFF
Affiliate Disclosure: HappyQuiz may earn a small commission on qualifying purchases at no extra cost to you.
Saved to your dashboard!