MauryaHub PYQ Practice

Programming in C · Quiz 1 · Sep 2023

Programming in C · Quiz 1 · Sep 2023

← Course papers · Start practice / exam

This page contains the reliably extracted subset, not the complete original paper.

Questions and published explanations below are available without starting a test. Some questions may not have a published solution yet.

0 / 18 published solutions

Question 128 MSQ · 2.0 marks

Which of the following is/are **false** statement(s) regarding C programming language?
6406532266826.
It is an imperative programming language.
6406532266827.
It is not a structured programming language.
6406532266828.
It is a dynamically typed programming language.
6406532266829.
The language uses curly braces ({ }) to define the scope of a for loop.

A published solution is not available for this question yet.

Report a correction for Q128

Question 129 MSQ · 2.0 marks

Which of the following statement(s) is/are **true** regarding ASCII and Unicode?
6406532266830.
Unicode is a character set.
6406532266831.
ASCII uses 6 bits to encode a given character.
6406532266832.
UTF-16 and UTF-32 are both variable length encoding techniques.
6406532266833.
UTF-8 is a fixed length encoding technique.

A published solution is not available for this question yet.

Report a correction for Q129

Question 130 MSQ · 2.0 marks

Which of the following is/are **valid** identifiers in C language?
6406532266863.
123var
6406532266864.
_myVar
6406532266865.
my-var
6406532266866.
Var_123
6406532266867.
myVar!

A published solution is not available for this question yet.

Report a correction for Q130

Question 131 MCQ · 2.0 marks

In split memory architecture, what is the purpose of cache memory?
6406532266834.
To store the operating system
6406532266835.
To provide the permanent storage
6406532266836.
To temporarily store frequently used data for fast access
6406532266837.
To control the input/output devices

A published solution is not available for this question yet.

Report a correction for Q131

Question 132 MCQ · 2.0 marks

What is the primary function of the Program Counter in a CPU?
6406532266838.
Execute arithmetic operations
6406532266839.
Keep track of the currently executing instruction
6406532266840.
To control the input/output devices
6406532266841.
Manage memory access

A published solution is not available for this question yet.

Report a correction for Q132

Question 133 MCQ · 2.0 marks

Suppose you have a document which contains 58 unique characters. What is the minimum number of bits required to encode a single character in this document?
6406532266846.
2\(^{6}\)
6406532266847.
6
6406532266848.
2\(^{7}\)
6406532266849.
7

A published solution is not available for this question yet.

Report a correction for Q133

Question 134 MCQ · 2.0 marks

Consider the following equation:
Source diagram or notation
If all the variables are float, which of the following is a correct way to write the given equation in C language?
6406532266868.Source diagram or notation
6406532266869.Source diagram or notation
6406532266870.Source diagram or notation
6406532266871.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q134

Question 135 MCQ · 4.0 marks

Consider the following steps to compute the **minimum** among three numbers. Load the three numbers from memory locations M[0], M[1] and M[2] and store the maximum number in M[3].
Source diagram or notation
Identify the appropriate instructions to fill the blank at step 4 and step 6.
6406532266842.
Step 4: If R[0] < R[1] then go to step 5, otherwise go to step 6 Step 6: If R[1] < R[2] then go to step 7, otherwise go to step 8
6406532266843.
Step 4: If R[0] > R[1] then go to step 5, otherwise go to step 6 Step 6: If R[1] < R[2] then go to step 7, otherwise go to step 8
6406532266844.
Step 4: If R[0] < R[1] then go to step 5, otherwise go to step 6 Step 6: If R[1] > R[2] then go to step 7, otherwise go to step 8
6406532266845.
Step 4: If R[0] > R[1] then go to step 5, otherwise go to step 6 Step 6: If R[1] > R[2] then go to step 7, otherwise go to step 8

A published solution is not available for this question yet.

Report a correction for Q135

Question 136 MCQ · 4.0 marks

Consider the below C program.
Source diagram or notation
The above C program is used to calculate the sum of individual digits of a number. For ex: If the value given to the variable “n” is 25, the sum of individual digits will be 7. Fill in the placeholders “Expression1” and “Expression2” to ensure that the program functions correctly.
6406532266889.
Expression1: r = n % 10; Expression2: n = r;
6406532266890.
Expression1: r = n / 10; Expression2: n = n % 10;
6406532266891.
Expression1: r = n % 10; Expression2: n = n / 10;
6406532266892.
Expression1: n = n % 10; Expression2: r = n;

A published solution is not available for this question yet.

Report a correction for Q136

Question 137 MCQ · 3.0 marks

Compute the 9-bit binary representation of the decimal number 468.
6406532266850.
011101010
6406532266851.
111010100
6406532266852.
011101001
6406532266853.
111010010

A published solution is not available for this question yet.

Report a correction for Q137

Question 138 MCQ · 3.0 marks

Find the 8-bit binary representation of (− 50)10 using 2’s complement notation.
6406532266854.
(11001111)2
6406532266855.
(11000111)2
6406532266856.
(11000110)2
6406532266857.
(11001110)2

A published solution is not available for this question yet.

Report a correction for Q138

Question 139 MCQ · 3.0 marks

(764)10 = (________)8 Identify the appropriate option to fill in the above blank.
6406532266858.
1271
6406532266859.
1364
6406532266860.
1374
6406532266861.
1274

A published solution is not available for this question yet.

Report a correction for Q139

Question 140 MCQ · 3.0 marks

Given two integer variables, x and y, which of the following expressions ensures that both x and y are distinct positive integers if the expression returns 1?
6406532266872.Source diagram or notation
6406532266873.Source diagram or notation
6406532266874.Source diagram or notation
6406532266875.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q140

Question 141 MCQ · 3.0 marks

Consider the following code snippet.
Source diagram or notation
What will be the value of x, y and z after executing the given code snippet?
6406532266876.
x = 2, y = 4, z = 1
6406532266877.
x = 2, y = 4, z = 0
6406532266878.
x = 2, y = 3, z = 1
6406532266879.
x = 2, y = 3, z = 0

A published solution is not available for this question yet.

Report a correction for Q141

Question 142 MCQ · 3.0 marks

Consider the below C program.
Source diagram or notation
What will be the output of above given code?
6406532266880.
Equal
6406532266881.
Not Equal
6406532266882.
Compilation error
6406532266883.
Runtime error

A published solution is not available for this question yet.

Report a correction for Q142

Question 143 MCQ · 3.0 marks

Consider the below C program.
Source diagram or notation
What would be the output of the given code?
6406532266884.
8
6406532266885.
3
6406532266886.
0
6406532266887.
4

A published solution is not available for this question yet.

Report a correction for Q143

Question 144 NAT · 3.0 marks

Consider the following assembly program (assume anything after “;” is a comment).
Source diagram or notation
What will be the final value stored in register R2? Note: The answer input must be an integer. For Ex: If the answer is 32, you must enter 32 only.

A published solution is not available for this question yet.

Report a correction for Q144

Question 145 NAT · 4.0 marks

Consider the below C program.
Source diagram or notation
What would be the output of the given code? Note: The answer input must be an integer. For Ex: If the answer is 32, you must enter 32 only.

A published solution is not available for this question yet.

Report a correction for Q145