Tag: programming languages

Questions Related to programming languages

main(){ int i=100,j=10,k=20; int sum; float ave; char myformat[]="ave=%.2f"; sum=i+j+k; ave=sum/3; printf(myformat,ave); }

  1. Compile error

  2. ave=43.33

  3. link error

  4. ave= 43.00


Correct Option: D

What would be the output of the following: class A { A() const; //... };

  1. Compile-Time Error

  2. Run time error

  3. Default construtor is called

  4. none of the above


Correct Option: A
  1. 1000

  2. garbage value

  3. undefined symbol _AX

  4. none of these


Correct Option: A