MCQ
Paper - II (v) — Programming Fundamentals MCQ - Practice Questions with Answers
Solve 57 Paper - II (v) — Programming Fundamentals questions for RAS/RPSC preparation.
Practice questions
Q1Which option correctly combines a blockchain property with an advantage of an Integrated Development Environment?
A blockchain is tested as a distributed ledger concept: transactions are grouped into blocks and linked in a tamper-evident way. An Integrated Development Environment is tested separately as a productivity tool because it combines editor support, build or run actions, and debugging assistance in one workspace.
Q2In Java, a class declaration uses the keyword implements with an interface name. What is the main implication of this declaration?
A Java interface is a contract for behavior. When a class declares that it implements an interface, the compiler expects the class to supply the methods required by that interface unless the class itself is abstract.
Q3In Java, which keyword is used in a class declaration to inherit from another class?
Java uses the keyword extends when a class is declared as a subclass of another class. For example, a declaration such as class Child extends Parent establishes that Child inherits accessible members from Parent.
Q4In a basic C program, which header file is normally included when the program uses printf() and scanf() for standard input and output?
In C, printf() and scanf() are standard library functions associated with formatted output and input. Their declarations are supplied through <stdio.h>, so including this header allows the compiler to check calls to these functions properly.
Q5In C programming, a variable declared as static inside a function is used to count how many times that function has been called. Which statement correctly describes such a variable?
A static local variable in C differs from an ordinary local variable mainly in storage duration. Its name is usable only within the block where it is declared, but the object is not destroyed when the function call ends. Therefore it is suitable for preserving a counter across repeated calls of the function.
You've seen 5 of 57 sample questions
Unlimited practice on Paper - II (v) — Programming Fundamentals comes with the RAS Test Series + Practice pack or Gate Pass.
More questions
6In a C program, which loop is most suitable when the loop body must execute at least once before the condition is tested?
7Which description most accurately captures machine learning at an introductory level?
8In the .NET platform, what is the role of the Common Language Runtime?
9Which feature is a practical advantage of using an Integrated Development Environment for a beginner writing C, Java, or Python programs?
10A beginner is asked to design a program before coding. Which sequence follows a sound programming technique?
11In Java, which keyword is used in a class declaration to inherit from a superclass?
12Which Python data type is most appropriate when a program must store unique roll numbers and quickly test whether a roll number is already present?
13In object-oriented programming, which pair best represents encapsulation?
14In Python, which comparison between a list and a tuple is correct?
15In C programming, which statement best describes why a function prototype is normally written before calling a user-defined function?
