Computer H/W & S/W
Datatypes
Operators
I/O Functions
Conditional or Branching
100

In a computer keyboard the Alt, Ctrl, Shift, Del & Insert keys are known as     

A.Standard keys    

B.Function keys   

 C.Navigation keys   

 D.Special purpose keys

 

D.Special purpose keys

100

Which data type is most suitable for storing a number 65000 in a 32-bit system?        

  • A. short                        
  •  B. int                        
  •  C. long                        
  •  D. double                        

 A. short  

100

Output of an arithmetic expression with integers and real numbers is ___ by default?

                        

a) Integer

 b) Real number                  

c) Depends on the numbers used in the expression

d) None of the above

Answer: B

100

#include <stdio.h>

 int main() {   

 int x = 1, y = 2;   

 printf("%d", x, y);   

 return 0; } 

A. 1
B. 2
C. Compilation Error
D. Garbage Value



Ans : A

100

Choose a C Conditional Operator from the list.

A) ?:

B) :?

C) :<

D) <:



A:A)

200
  • Software is the ____.
  1. parts of the computer that can’t be seen  
  2. parts of the computer that can be seen 
  3. none of these
  • parts of the computer that can’t be seen  ✔
200

Which of the following is a User-defined data type?        

  •  A. typedef int Boolean;                        
  •  B. typedef enum {Mon, Tue, Wed, Thu, Fri} Workdays;                        
  •  C. struct {char name[10], int age};                        
  •  D. All of the mentioned                        

D. All of the mentioned        

200

What is the value of a?

                        

int a = 10 + 4.867;

                        

a) a = 10
                            b) a = 14.867
                            c) a = 14
                            d) compiler error
                            

                        

                                                    


Answer: C

200

#include <stdio.h>

 int main()

 {    char str[25];  

  printf(" %d ",printf("c-letsfind"));    

return 0; }

A. 10 c-letsfind
B. 9 c-letsfind
C. c-letsfind  9
D. c-letsfind  10

Ans : D

 Explanation: Inner printf() will print first and then outer printf will display the length of the inner printf's string.

200

Choose a syntax for C Ternary Operator from the list.

A) condition ? expression1 : expression2

B) condition : expression1 ? expression2

C) condition ? expression1 < expression2

D) condition < expression1 ? expression2


Answer: A

300
  • Which one of the following is the Software?
  1. Monitor
  2. Keyboard
  3. Hard Disk
  4. MS Paint  
  • MS Paint  ✔
300

 Which of the following cannot be a variable name in C?

A. TRUE
B. friend
C. export
D. volatile



          

   Ans : D

300

Can you use C Modulo Division operator % with float and int?                 

a) Only int variables
b) Only float variables

 c) int or float combination
d) Numerator int variable, Denominator any variable

Answer: A

300

What error will be generated on using incorrect specifier for the datatype being read?
a) compile error
b) run-time error
c) logical error
d) no error

Answer: b
Explanation: Using an incorrect specifier for the datatype being read will generate a run-time error.

300

Which is the alternative to SWITCH in C language?

a) If
b) Else
c) If-Else
d) All of these

Answer:- d) All of these

We can implement a SWITCH statement using IF, ELSE, and ELSE IF control statements.

400
  • A microprocessor is ____.
  1. A combined unit of monitor and keyboard
  2. A combined unit of ALU and CU 
  3. A combined unit of CPU and UPS 
  4. None of these

2. A combined unit of ALU and CU ✔

400

What is short int in C programming?        

  •  A. Basic data type of C                        
  •  B. Qualifier                        
  •  C. short is the qualifier and int is the basic datatype                        
  •  D. All of the mentioned.                                                                                           

 

 Answer: Option C

400

What is the other name of Question Mark Colon Operator?                        

a) Comparison Operator
                            b) If-Else Operator
                            c) Binary Operator
                            d) Ternary Operator

Answer: D

400

scanf returns as its value

a.Number of successfully matched and assigned input items

b.Nothing

c.Number of characters properly printed

d.Error

A:Number of successfully matched and assigned input items

400

In the SWITCH-CASE statement the default case must be used?

a) TRUE
b) FALSE

Answer:- b) FALSE

The use of default case in the SWITCH-CASE statement is optional.

500

A computer’s type, processor, and operating system define its

a) brand

b) size

c) platform

d) speed

e) none of these


                       


Answer: (d)

500

1. How many keywords are there in c ?

A. 31
B. 32
C. 64
D. 63

Ans : B

500

In C programming language, which of the following type of operators have the highest precedence

                        

a) Relational Operators
                            b) Equality Operators
                            c) Logical Operators
                            d) Arithmetic Operators

Answer: D

500

For floating point numbers, the precision flag specifies the number of decimal places to be printed. When no precision modifier is specified, printf() prints _______
a) six decimal positions
b) five decimal positions
c) four decimal positions
d) three decimal positions

Answer: a
Explanation: Its format can be given as “. m”, where m specifies the number of decimal digits when no precision modifier is specified, printf prints six decimal positions.

500

What is the maximum number of ELSE-IF statements that can be present in between starting IF and ending ELSE statements?

a) 32
b) 64
c) 128
d) None


r Answer:- d) None