Skip to main content

Paper - II (iv) — Programming Fundamentals MCQ — 45 Practice Questions with Answers

Paper - II (iv) — Programming Fundamentals is a Programming & Data Structures (Senior CI) topic in the RAS/RPSC syllabus. This page gathers exam-style Paper - II (iv) — Programming Fundamentals multiple-choice questions with correct answers and explanations, so aspirants can test recall and revise frequently examined concepts.

Practice 45 Paper - II (iv) — Programming Fundamentals multiple-choice questions with detailed answers and explanations. Ideal for RAS/RPSC exam preparation.

45 Questions Programming & Data Structures (Senior CI)

Reviewed by: Aspirant Academy Editorial Team

Practice Questions

Q1. In a basic blockchain, why does changing data in an earlier block become tamper-evident?

A Every block is automatically encrypted with the same password.
B A block includes a hash-based identifier of the previous block, so changing earlier data changes later linkage checks. Correct
C Blocks are stored only on a single central server that blocks all edits.
D Each block contains the private key of every later block.

Explanation

Blockchain records are grouped into blocks that are linked using hash-based identifiers of earlier block data. If data in an older block is altered, its identifier changes, and later blocks that refer to the old value reveal the inconsistency.

Q2. In C, what is the value printed by printf("%d", 3 + 4 * 2 == 11 && 0 || 5); assuming the usual integer result of relational and logical operators?

A 1 Correct
B 0
C 11
D 5

Explanation

C operator precedence places multiplication above addition, equality below addition, logical AND below equality, and logical OR below logical AND. Thus 3 + 4 * 2 becomes 11, 11 == 11 becomes 1, 1 && 0 becomes 0, and 0 || 5 becomes 1.

Q3. Which feature of a blockchain most directly helps detect tampering with an earlier block?

A Each block is stored only on one central server.
B Every transaction is deleted after the next block is created.
C Blocks are renamed alphabetically after validation.
D Each block includes a cryptographic hash link to the previous block's contents. Correct

Explanation

A blockchain connects blocks by storing hash-based references to earlier block data. If an old block is altered, its computed hash changes, so the following block's stored reference no longer matches and the alteration becomes detectable.

Q4. A C program declares union Data { int i; float f; char text[20]; }; Which statement is the best reason a union is different from a structure here?

A All union members are initialized automatically whenever the union variable is created.
B The union always occupies storage equal to the sum of all members, just like a structure.
C A union member can be accessed only through a pointer, while a structure member can use the dot operator.
D The members share the same storage area, so writing one member affects the stored representation used by the others. Correct

Explanation

A C structure allocates separate storage for each member, but a union overlays its members in a common storage area large enough for its largest member with required alignment. Therefore it is suitable when exactly one representation is intended to be active at a time.

Q5. In C, let `int a[3] = {2, 4, 6}; int *p = a;`. Which expression evaluates to `4` without changing `p`?

A `p[2]`
B `*p + 1`
C `*(p++)`
D `*(p + 1)` Correct

Explanation

In C array expressions commonly provide a pointer to the first element, and pointer arithmetic is scaled by the pointed type. Therefore `p + 1` points to `a[1]`, and `*(p + 1)` reads `4` while leaving `p` unchanged.

You've seen 5 of 45 sample questions

Unlimited practice on Paper - II (iv) — Programming Fundamentals comes with the RAS Test Series + Practice pack. Sign up to save progress; practice sets open with a pack or Gate Pass.

More questions (pack required)

Pack unlocks practice

Q6.

A
B
C
D
Pack unlocks practice

Q7.

A
B
C
D
Pack unlocks practice

Q8.

A
B
C
D
Pack unlocks practice

Q9.

A
B
C
D
Pack unlocks practice

Q10.

A
B
C
D
Pack unlocks practice

Q11.

A
B
C
D
Pack unlocks practice

Q12.

A
B
C
D
Pack unlocks practice

Q13.

A
B
C
D
Pack unlocks practice

Q14.

A
B
C
D
Pack unlocks practice

Q15.

A
B
C
D

40 more questions can appear in generated practice.

Frequently Asked Questions

How many Paper - II (iv) — Programming Fundamentals MCQ questions are available?
There are 45 Paper - II (iv) — Programming Fundamentals practice MCQs available on Aspirant Academy, with detailed answers and explanations for each question.
Are answers and explanations provided for Paper - II (iv) — Programming Fundamentals MCQs?
Yes, every Paper - II (iv) — Programming Fundamentals question comes with the correct answer and a detailed explanation to help you understand the underlying concept.
How is Paper - II (iv) — Programming Fundamentals relevant to the RAS/RPSC exam?
Paper - II (iv) — Programming Fundamentals falls under the Programming & Data Structures (Senior CI) section of the RAS/RPSC syllabus. It is a frequently tested area and regular practice with these MCQs will strengthen your preparation.
Can I practice Paper - II (iv) — Programming Fundamentals questions in Hindi?
Yes, Aspirant Academy offers bilingual support. You can practice Paper - II (iv) — Programming Fundamentals MCQs in both English and Hindi, including questions, options, and explanations.

More Topics in Programming & Data Structures (Senior CI)

Continue your Programming & Data Structures (Senior CI) preparation with these related topics.

Explore Other Subjects

Want unlimited practice on Paper - II (iv) — Programming Fundamentals?

Unlimited practice comes with the RAS Test Series + Practice pack. Create a free account to save progress and choose a pack or Gate Pass when you are ready.

Browse all subjects