• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

SP2 Contest 1

Question 11

Which of the following statement(s) is/are True about Data-Types in C?
  1. If no data type is given to a variable, then the compiler automatically convert it to int data type.
  2. Signed is the default modifier for char and int data types.
  3. We can use any modifiers in the float data type.
  4. We can use any modifiers in double data type.
  • Only 1
  • Only 3
  • Both 1 and 2
  • All of the above

Question 12

C
#include <iostream>
using namespace std;

int main() {
	
	int i = 256;
	
	for(;;)
	   {
	       cout<<\"Hello World\\n\";
	       
	       i = i<<1;
	       
	       if(i<0)
	            break;
	   }
	    
	return 0;
}
How many times will "Hello World" be printed by the above program?
  • 23
  • 32
  • 11
  • Infinite Loop

Question 13

Let A be a square matrix of size n × n. The maximum number of elements that can be nonzero in a row of A without causing an overflow is 2^p. What is the minimum possible value of p?

  • log_2(n)

  • log_2(n/2)
     

  • log_2(n-1)

  • log_2(n+1)

Question 14

Which of the below statement(s) is/are correct?
  • During external variable definition, storage is set aside by the compiler.
  • During external variable declaration, no storage is set aside by the compiler.
  • Both A and B are correct.
  • None of the above.

Question 15

Which of the following expression is correct to check if a given number N is a power of 2 or not?
  • N && (N - 1)
  • N || (N - 1)
  • N ^ (N – 1)
  • N & (N - 1)

Question 16

Whenever there are two operands of different data types involved in an expression, then the one with lower rank automatically gets promoted to the data type with a higher rank. This is called Type Promotion in C. Below are some data types arranged in order of their ranks. Choose the correct order.
  • double > float > int > unsigned
  • int < unsigned < double < float
  • int < unsigned < float < double
  • float > double > int > unsigned

Question 17

Find the missing term from the below series:
1,  2,  5,  12,  ....,  58
  • 30
  • 37
  • 25
  • 27

Question 18

Look at the below series:
1 = 1,  2 = 5,   3 = 13,  4 = ?,  5 = 61
Choose the correct value for "?" from the below options:
  • 39
  • 29
  • 34
  • 36

Question 19

Find the missing term from the below series:
B78,  D65,  F75,  H62,___,  L59
  • J75
  • I70
  • J72
  • K72

Question 20

Find the missing term from the below series:
2,  3,  25,  6,  7,  169,  9,___,  361.
  • 9
  • 8
  • 7
  • 10

There are 50 questions to complete.

Last Updated :
Take a part in the ongoing discussion