Computer Knowledge

Programming Fundamentals

2,611 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. At the beginning of the file

  2. At the end of the file

  3. In the middle of data file

  4. At the current position of data file

  5. Automatically positioned

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

This is the correct option as whenever a user sends read request to a data file, the get pointer is always positioned at the beginning of the data file sample.dat.

Multiple choice
  1. a, c, d, e, f

  2. a, b, d, e, f

  3. a, d, e, f

  4. a, b, c, d, e

  5. All statements are true

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

All statements are true. There is no mistake in any statement.

Multiple choice
  1. Array is a collection of variables belongings to the same data type.

  2. Array may belong to any of the pre-defined data types.

  3. Array size may be a variable or constant value.

  4. Contiguous memory locations are used to store array elements in the memory.

  5. None of the above

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

The statement is incorrect about array. Array size must be a constant value.

Multiple choice
  1. Both statement 1 and statement 2 are true.

  2. Only statement 1 is true.

  3. Only statement 2 is true.

  4. Neither statement 1 nor statement 2 are true.

  5. None of the above

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

yes, both statement 1 and statement 2 are false because data structure is not used for visualization of data but for storing data and data structure is not programming language dependent.data structure is a way of storing data and the concept remains the same even if it is implemented in different languages

Multiple choice
  1. checked

  2. unchecked

  3. both (1) and (2)

  4. none of these

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

Compiler enforces us to deal with checked exceptions. For example, if we have to write something into file, then we have to write statements into try and catch (handling exception). If we cannot write in that way, then compiler gives compile time error.