0% found this document useful (0 votes)
46 views3 pages

Solved MCQs ch#6

This document contains a test paper with multiple choice questions about C programming language concepts like variables, data types, operators, and expressions. There are 49 questions in total testing knowledge of identifiers, keywords, data type sizes, logical and relational operators.

Uploaded by

Nouman Akhtar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views3 pages

Solved MCQs ch#6

This document contains a test paper with multiple choice questions about C programming language concepts like variables, data types, operators, and expressions. There are 49 questions in total testing knowledge of identifiers, keywords, data type sizes, logical and relational operators.

Uploaded by

Nouman Akhtar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Smart Guess & Test Papers

Student Name ______________________ Father Name ______________________ Roll Number _______


Class: 2nd /Year - Computer Science New Marks : 78 Exam Format : Chapter Wise MCQs
Time : notespk.com_Nauman Sadaf | Date _________________ Examiner Sig __________ Chapter#: 9

MCQ's S/Q L/Q Total

Objective Type

1. Encircle the Correct Option. (1 x 58 = 58)


1) ______ is the name given to a variable , constant , function or a label in the program .
a) Keyword b) Identifier c) Reserved word d) Operator

2) An identifier in C language , may consists of ________ character .


a) 30 b) 31 c) 32 d) 33

3) How many types of identifiers are in C language ?


a) 2 b) 3 c) 4 d) 5

4) A type of an identifier which has a special meaning in C .


a) User - defined identifier b) Standard identifier c) Both A & B d) None of these

5) Printf and scanf are example of .


a) User - defined identifier b) Standard identifer c) Both A & B d) None of these

6) A type of an identifier which is defined by a programmer to access memory location (s) .


a) User - defined identifier b) Standard identifier c) Both A & B d) None of these

7) Rollno , student Name and marks are examples of .


a) User - defined identifier b) Standard identifier c) Both A & B d) None of these

8) Which of the following is NOT a valid identifier ?


a) Rerutn b) MyInt c) MyInteger d) Total3

9) Total number of keywords in C is .


a) 30 b) 32 c) 34 d) 36

10) Variables are created in .


a) RAM b) ROM c) Hard Disk d) USB

11) Variables are created in .


a) RAM b) ROM c) Hard Disk d) Cache

12) Variable and constant name cannot contains a (n) .


a) Letter b) Underscore c) Period d) Number

13) In C , the maximum length of text name is .


a) 25 Characters b) 255 Characters c) 155 Characters d) 55 Characters

14) What is the name for a word that has a specific meaning in C language ?
a) Keywords b) Commands c) Operands d) Operators

15) Which of the following is a keyword ?


a) int b) main c) printf d) include

16) A process of assigning initial value to a variable at the time of declaration is called .
a) Assigning b) Initializing c) Naming d) Executing

17) A memory location with some data that can be changed is called .
a) Constant b) Named constant c) Address d) Variable

18) Which is a valid character constant ?


a) A b) " Hello " c) ' 6 ' d) =

19) Which of the following are valid examples of character constant ?


a) ' A ' b) ' 9 ' c) ' $ ' d) All of these

20) Which of the following is a valid character constant .


a) a b) @ c) c d) =

21) Which term describes the kind of values that a variable can store ?
a) Data type b) Variable name c) Variable type d) Variable size

22) The number of bytes used by int data type in C is .


a) 8 b) 6 c) 4 d) 2

23) Which of the following data type offers the highest precision ?
a) Float b) Long int c) Long double d) Unsigned long int

24) When the result of the computation of two very small numbers is too small to be represented , this phenomenon is called .
a) Arithmetic overflows b) Truncation c) Arithmetic underflow d) Round off

25) The only binary operator in the following is .


a) ? b) ++ c) -- d) +

26) Which operators are used to join two or more conditions ?


a) Relational b) Logical c) Assignment d) Comparison

27) Relational operators allow you to _______ value .


a) Compare b) Add c) Muliply d) Divide

28) Which is a numeric data type ?


a) Floating point b) Integer c) Both A & B d) String

29) How many types of real data are in C language ?


a) 1 b) 2 c) 3 d) 4

30) The number of bytes used by " float " data type in C is .
a) 2 b) 4 c) 6 d) 8

31) Which of the following data type is used to store " String " ?
a) Char b) Float c) String d) Double

32) What happens when the result of a calculation exceeds the capacity of data type ?
a) System error b) Logic error c) Syntax error d) Overflow

33) When a relational expression is false , it has the value .


a) Zero b) One c) Less than zero d) Two

34) All of the following are logical operators expect .


a) && b) c) ! d) >=

35) a + = b is equivalent to .
a) b + = a b) a = + b c) a = a + b d) b = b + a

36) The value of C expression 5/9*2 are .


a) 0.27 b) 1.11 c) 2

37) For A = 4 and B = 4 which expression evaluates as true ?


a) A > = B b) A ! = B c) A < B d) A > B

38) The expression p - = q is equivalent to .


a) p = q - p b) p = q - 1 c) p = p - q d) q = p - q

39) An expression that uses a relational operator is known as .


a) Operational b) Sequential c) Serial d) Relational

40) The symbols that perform operations on data are called .


a) Operators b) Syntax c) Operation code d) Operands

41) The expression 11% 3 has a value equal to .


a) 1 b) 3 c) 2 d) 8

42) Any relational expression produces following results .


a) True b) False c) Either A or B d) Any value

43) Logical operators are .


a) NOT b) AND c) OR d) All of these

44) An expression consists of .


a) Operators b) Operands c) Both A & B d) None of these

45) The text written between /* and */ is called .


a) Command b) Line c) Sentence d) Comment

46) Variable are created in .


a) RAM b) ROM c) Hard Disk d) Cache

47) Which of the following is a valid character constant ?


a) a b) "6" c) '6' d) =

48) Which of the following data type offers the highest precision ?
a) Float b) Long int c) Long double d) Unsigned long int

49) When the result of the computation of two very small numbers is too small to be represented , this phenomenon is called .
a) Arithmetic overflows b) Truncation c) Arithmetic underflow d) Round off

50) The symbol '=' represents .


a) Comparison operator b) Equal to operator c) Assignment operator d) None of these

51) Which of the following operators has lowest precedence ?


a) ! b) + c) = d) ==

52) Relational operators are used to .


a) Establish a relationship among b) Compare two values c) Constant compound condition d) Perform arithmetic operations
variables
53) C is a strongly typed language , this means that ,
a) Every program must be b) Every variable must be c) The variable declaration also d) Sufficient data types are available
compiled before execution declared before it is being used defines the variable to manipulate each type of data

54) The logic not operator , denoted by ! , is a .


a) Ternary operator b) Binary operator c) Unitary operator d) Bitwise operator

55) a + = b is equivalent to
a) b + = a b) a = a - b c) a = a + b d) b = b + a

56) An expression that uses a relational operator is known as.


a) Operational b) Serial c) Sequential d) Relational

57) An expression consists of.


a) Operators b) Operands c) Both A & B d) None of these

58) The expression 0 % 4 has a value equal to.


a) 4 b) 1 c) 2 d) 0

2. Write "T" for a true statement and "F" for a false statement (1 x 10 = 10)
59) Printf and scanf are standard identifiers .
✅ True ☐ False

60) In C language , all variables must be declared before being used .


✅ True ☐ False

61) Standard data types are not predefined in C language .


☐ True ✅ False

62) The double data type required 4 bytes in memory .


☐ True ✅ False

63) In Scientific notation , the exponent represents the value of the number and mantissa represents the power to which it is raised .
☐ True ✅ False

64) The symbol = is used to compare two values .


✅ True ☐ False

65) The symbol for modulus operators is % .


✅ True ☐ False

66) Operator precedence determines the order of evaluation of operators in an expression.


✅ True ☐ False

67) For many compilers a C variable name can be up to 31 characters .


✅ True ☐ False

68) C program can only use lowercase letters in variable names .


☐ True ✅ False
3. Fill in the blanks. (1 x 10 = 10)
69) The first character of a variable name must be a _____________
Letter

70) _________ operates on two operands .


Binary operations

71) Named memory cells which are used to store program's input and output are called ___________ .
Variable

72) The maximum length of a character constant is ___________ character .


One

73) The value of a variable of type into ranges from ___________ to ___________ .
-32768 to 32767

74) The value of an unsigned into variable ranges from 0 to ________ .


65635

75) The value of a float variable ranges from ____________ to __________ .


10-38 , 1038

76) The symbol for logical OR operator is ____________ .


77) ______________ are used to increase the readability of the program .


Comments

78) Multi - line comments start with __________ .


/* , */

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy