Computer Knowledge

Programming Fundamentals

2,381 Questions

Programming fundamentals form the core logic of software development and computer science. This includes variable declarations, pointer assignments, loop iterations, and exception handling. These technical topics are regularly tested in computer knowledge and IT officer competitive examinations.

Variables and arraysPointer assignmentsLoop iterationsException handling blocksCompile time errorsFunction references

Programming Fundamentals Questions

Multiple choice
  1. Thrown by pointer on allocation failure

  2. Thrown by new operator on allocation failure

  3. Thrown by wrong allocation of data type

  4. Thrown by cin and cout

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

When we are allocating the memory using new operator and allocation fail, then bad_alloc exception is thrown by the program. 

Multiple choice
  1. never execute

  2. always execute

  3. execute if catch block will execute

  4. execute if catch block will not execute

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

A block labelled as finally, just after the catch statements, will always be executed.

Multiple choice
  1. Yes

  2. No

  3. Sometimes

  4. with brute force

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The main method is a static entry point for the JVM and cannot be overridden in the traditional sense of polymorphism.

Multiple choice physics universe and space science launching of an artificial satellites around the earth launching of satellite india’s space programmes

Validation of programs is used to check that data is

  1. In right format

  2. Of right type

  3. Within possible value ranges

  4. All of above

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Data validation is a process of ensuring data have undergone data cleansing to ensure they have data quality i.e they are both correct and useful. Apart from data cleansing the data must be within possible value range that ensures smooth and effective functioning of the space satellite. Hence all the three option are correct.

Multiple choice accountancy accounting software - tally concept of entity and relationship designing and creating simple tables, forms, and queries objective in dbms

In macro programming, the objects using individual instructions called ______-oriented actions are manipulated.

  1. forms

  2. pages

  3. queries

  4. macro

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

In macro programming, the objects using individual instructions called macro-oriented actions are manipulated. A macro is a list of macro-oriented actions that run as a unit. Access provides for such macro programming.

Multiple choice
  1. Code that can only be used once in the application

  2. Reusable pieces of code that can be called on repeatedly.

  3. A special type of variable

  4. Indefinite arrays

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Functions are blocks of organized, reusable code that perform a single, related action. They allow for modularity and avoid code repetition.

Multiple choice
  1. Integers

  2. Floats

  3. Numbers

  4. Booleans

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Comparison operators in Python (like ==, !=, <, >) evaluate the relationship between values and return a boolean result, which is either True or False.

Multiple choice
  1. makes code more readable

  2. allows us to select between multiple outcomes

  3. allows functions to be called

  4. allows the interpreter to print values to the console

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Control flow refers to the order in which individual statements, instructions, or function calls are executed. It allows programs to make decisions (branching) and repeat actions (looping) based on conditions.