Q. During execution of a program the compiler demands for block of memory to operating system.This block is called as _____________.

  • (A) code memory
  • (B) data memory
  • (C) runtime storage
  • (D) none of these
πŸ’¬ Discuss
βœ… Correct Answer: (C) runtime storage

Q. What is relationship between reliability and failure?

  • (A) direct relationship
  • (B) inverse relationship
  • (C) no relation
  • (D) varying relation depending upon the situation
πŸ’¬ Discuss
βœ… Correct Answer: (D) varying relation depending upon the situation

Q. #include <stdio.h>
#define count 10;
void main()
{
printf("%d", count);
}

  • (A) 10
  • (B) syntax error
  • (C) infinity
  • (D) none of these
πŸ’¬ Discuss
βœ… Correct Answer: (B) syntax error

Q. When variable used in the program is a whole number,then variable is stored as ___________.

  • (A) string data type
  • (B) integer data type
  • (C) negative whole number
  • (D) positive whole number
πŸ’¬ Discuss
βœ… Correct Answer: (B) integer data type

Q. Class is _______.

  • (A) template which associates code and data
  • (B) data abstraction
  • (C) implementation of abstract data type
  • (D) object oriented
πŸ’¬ Discuss
βœ… Correct Answer: (D) object oriented

Q. What will be the output of following code? #include <iostream> using namespace std;

int main()
{
enum color
{
blue, orange, green
};

enum fruit
{
apple, guava, orange
};

int i = 0;
for (i = blue; i <= green; i++)
printf("%d", i);
return 0;
}

  • (A) 0 1 2
  • (B) 1 2 3
  • (C) syntax error
  • (D) none of these
πŸ’¬ Discuss
βœ… Correct Answer: (C) syntax error

Q. What is the output of following code?
#include <iostream>
using namespace std;
int main()
{
int I;
enum test
{
a = 1, b, c, d, e, f, g, h
};

for (i = c; i <= g; i++) cout << " " << I;
return 0;
}

  • (A) syntax error
  • (B) 3 4 5 6 7
  • (C) 1 2 3 4 5
  • (D) none of these
πŸ’¬ Discuss
βœ… Correct Answer: (B) 3 4 5 6 7

Q. Which size should be used when double precision is required?

  • (A) float
  • (B) double
  • (C) long double
  • (D) none of these
πŸ’¬ Discuss
βœ… Correct Answer: (B) double

Q. #include <iostream>
using namespace std;
int main()
{
float a = 22.22;
double b = 22.22;
if (a == b) cout << "Matching";
else cout << "Not Matching";
return 0;
}

  • (A) matching
  • (B) non matching
  • (C) syntax error
  • (D) none of these
πŸ’¬ Discuss
βœ… Correct Answer: (B) non matching

Jump to