Languages [3i Infotech Placement]: Sample Questions 194 - 197 of 546

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 194

Edit

Write in Short

Short Answer▾

Predict the output or error (s) for the following:

  1. main ()
  2. {
  3.     chara[4] =“HELLO”;
  4.     printf ( “%s”, a);
  5. }

Explanation

  • In this program
Table Showing the Program
char a [4] = “HELLO” ;
  • The character array a is of size 4 but the string constant requires 6 bytes to get stored.
  • So the compiler errors are accured.

Question 195

Edit

Write in Short

Short Answer▾

What is an incomplete type?

Explanation

  • Incomplete types refers to pointers non-available to be used in the implementation or they points to some location whose value is not available for modification. Example: int ⚹ i = 0x400 // i points to address 400 ⚹ i = 0; //set the value of memory location pointed by i.
  • Incomplete types are otherwise called uninitialized pointers.
Define the Incomplete Type Means Uninitialized Pointer

Question 196

Languages
Edit

Statement

True-False▾

Final methods can be overridden.

Answer

FALSE

Explanation

Understanding of Overriding
  • Statement is false
  • Final is used just before data members or even for a class.

For instance,

final method_name ()

final class_name ()

Anything, final cannot be extended or modified.

Question 197

Languages
Edit

Write in Short

Short Answer▾

What are byte codes?

Explanation

  • Bytecode is object-oriented programming code compiled to run on a virtual machine instead of a central processing unit.
  • A VM transforms program code into readable machine language for the CPU
  • As platforms utilize different code interpretation techniques- bytecode provides interoperability.
  • A VM converts bytecode for plateform interoperability, but bytecode is not plateform specific.

Developed by: