[Programming MCQS ]

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

[ Programming MCQS ]

Useful GK for JPSC, JSSC, JET, Jharkhand Police and other exams.
51. static keyword variable के साथ उपयोग होने पर क्या दर्शाता है?
[A] The variable is only accessible within its function
[B] The variable is visible throughout the program
[C] The variable value cannot be changed
[D] The variable can only be accessed from other files
51. What does the “static” keyword indicate when used with a variable in C?
[A] The variable is only accessible within its function
[B] The variable is visible throughout the program
[C] The variable value cannot be changed
[D] The variable can only be accessed from other files
सही उत्तर: B
व्याख्या: static variable program execution के दौरान value retain करता है।
Correct Answer: B
Explanation: static variables retain their value during program execution.
52. typedef keyword का उद्देश्य क्या है?
[A] It declares a new data type
[B] It defines a new function
[C] It performs type casting
[D] It specifies a loop condition
52. What is the purpose of the “typedef” keyword in C?
[A] It declares a new data type
[B] It defines a new function
[C] It performs type casting
[D] It specifies a loop condition
सही उत्तर: A
व्याख्या: typedef existing data type का नया alias बनाने के लिए उपयोग होता है।
Correct Answer: A
Explanation: typedef is used to create a new alias for data types.
53. C के typedef के बारे में कौन सा statement सही है?
[A] It creates a new data type alias
[B] It creates a new data type
[C] It is used to define variables
[D] It is used to create arrays
53. Which of the following is true about C’s “typedef”?
[A] It creates a new data type alias
[B] It creates a new data type
[C] It is used to define variables
[D] It is used to create arrays
सही उत्तर: A
व्याख्या: typedef नया alias बनाता है, नया data type नहीं।
Correct Answer: A
Explanation: typedef creates aliases for existing data types.
54. enum keyword का उद्देश्य क्या है?
[A] To declare a new data type
[B] To define a new function
[C] To declare variables
[D] To define a list of named constants
54. What is the purpose of the “enum” keyword in C?
[A] To declare a new data type
[B] To define a new function
[C] To declare variables
[D] To define a list of named constants
सही उत्तर: D
व्याख्या: enum named constants की सूची बनाने के लिए उपयोग होता है।
Correct Answer: D
Explanation: enum defines a set of named constants.
55. & operator का उपयोग किसलिए किया जाता है?
[A] Arithmetic operations
[B] Bitwise operations
[C] Address of a variable
[D] Logical operations
55. The “&” operator is used for:
[A] Arithmetic operations
[B] Bitwise operations
[C] Address of a variable
[D] Logical operations
सही उत्तर: C
व्याख्या: & operator variable का address प्राप्त करता है।
Correct Answer: C
Explanation: & is used to get the address of a variable.
56. निम्न में से कौन valid bitwise operator नहीं है?
[A] <<
[B] ~
[C] ><
[D] >>
56. Which of the following is NOT a valid bitwise operator in C?
[A] <<
[B] ~
[C] ><
[D] >>
सही उत्तर: C
व्याख्या: >< कोई valid bitwise operator नहीं है।
Correct Answer: C
Explanation: >< is not a valid bitwise operator.
57. -> operator C में क्या करता है?
[A] Compares two values
[B] Performs arithmetic operations
[C] Accesses a member of a structure through a pointer
[D] Declares a pointer variable
57. What does the “->” operator do in C?
[A] Compares two values
[B] Performs arithmetic operations
[C] Accesses a member of a structure through a pointer
[D] Declares a pointer variable
सही उत्तर: C
व्याख्या: -> operator structure pointer के members access करने के लिए उपयोग होता है।
Correct Answer: C
Explanation: -> accesses structure members through pointers.
58. sizeof function का उद्देश्य क्या है?
[A] It returns the size of an array
[B] It returns the size of a data type in bytes
[C] It calculates the sum of an array elements
[D] It calculates the average of an array elements
58. What is the purpose of the “sizeof” function in C?
[A] It returns the size of an array
[B] It returns the size of a data type in bytes
[C] It calculates the sum of an array elements
[D] It calculates the average of an array elements
सही उत्तर: B
व्याख्या: sizeof memory size bytes में return करता है।
Correct Answer: B
Explanation: sizeof returns size in bytes.
59. Array arr के nth element को access करने का सही तरीका कौन सा है?
[A] arr(n)
[B] arr[n]
[C] arr.n
[D] arr->n
59. Which of the following is a valid way to access the nth element of an array “arr”?
[A] arr(n)
[B] arr[n]
[C] arr.n
[D] arr->n
सही उत्तर: B
व्याख्या: Array indexing square brackets [] द्वारा होती है।
Correct Answer: B
Explanation: Arrays are accessed using square brackets.
60. C में pointer क्या store करता है?
[A] A data value
[B] An address in memory
[C] A label for an array
[D] A character value
60. In C, a pointer is a variable that stores:
[A] A data value
[B] An address in memory
[C] A label for an array
[D] A character value
सही उत्तर: B
व्याख्या: Pointer memory address store करता है।
Correct Answer: B
Explanation: Pointers store memory addresses.