Tag: programming languages

Questions Related to programming languages

Multiple choice technology programming languages
  1. It is just a fancy keyword, No purpose here

  2. Prevents the compiler from assigning the function as an rvalue

  3. Prevents the compiler from assigning the function as an lvalue

  4. It makes sure that the return value is a const and is not changed by anyone else

Reveal answer Fill a bubble to check yourself
C Correct answer
Multiple choice technology programming languages
  1. Nothing is wrong. You are wrong.

  2. Loops are not allowed inside the function scope, Since it degrades performance

  3. My friend tried to return a pointer to a local function variable , which is invalid once the function call compltes.

  4. The value i is not properly initialised, SO it may contain some garbage .

Reveal answer Fill a bubble to check yourself
C Correct answer
Multiple choice technology programming languages
  1. The point3d is represented as struct . change it to a class and it will run better

  2. The point3d struct is not byte aligned.

  3. The in the function point3d struct parameters are passed by value, Which will cause additional overhead.

  4. The point3d struct has 3 members of type int . Change it to short ,the program will run faster.

Reveal answer Fill a bubble to check yourself
C Correct answer