Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

GROUP 3

Leader: Pega, A-jay V


Members: Dayson, Amaine Shayne
Molina, Tricia Marie
Hernandez, John Kennedy

Questions:

1. It is used in defining a variable or functions in C Programming. It is also important for


the compiler to understand the type of predefined data it is going to encounter in the
program.
a. Keywords
b. Operators
c. Data Types
d. Modifiers

2. What is keywords?
a. Keywords have some predefine meanings and these meanings can be changed.
b. Keywords have some predefine meanings and these meanings cannot be changed.
c. Keywords have some unknown meanings and these meanings cannot be changed.
d. None of the above

3. These are the storage areas in a code that the program can easily manipulate.
a. Variables
b. Constant
c. Modifiers
d. Data Types
4. Which of the following are tokens in C?
a. Keywords
b. Variables
c. Constant
d. All of the above

5. A C variable cannot start with


a. An alphabet
b. A number
c. A special symbol other than underscore
d. both B and C

6. What is Constant?
a. Constant have fixed values that do not change during the execution of a program.
b. Constant have fixed values that change during the execution of a program.
c. Constant have unknown values that may be change during the execution of a
program.
D. None of the above

7. What is the precedence of arithmetic operators (from highest to lowest)?


a) %, *, /, +, –
b) %, +, /, *, –
c) +, -, %, *, /
d) %, +, -, *, /
8. Which of the following is not an arithmetic operation?
a) a * = 10;
b) a / = 10;
c) a ! = 10;
d) a % = 10;

9. Which among the following are the fundamental arithmetic operators, i.e, performing
the desired operation can be done using that operator only?
a) +, –
b) +, -, %
c) +, -, *, /
d) +, -, *, /, %

10. Which among the following is NOT a logical or relational operator?


a) !=
b) ==
c) ||
d) =

11. Relational operators cannot be used on ____________


a) structure
b) long
c) strings
d) float

12. What will this return?


bool test = (24+32 < 88-21) || (100-91 < 45/5);
a. False
b. True
13. What will this return?
bool test = (24+32 < 88-21) && (100-91 < 45/5)
a. False
b. True

14. ____________Operator is used to check if any one of the given conditions is true or
not.
a. (AND)
b. % (MODULUS)
c. ! (NOT)
d. || (OR)

15. ____________ relational operator is used for checking if the value of the left
operand is less than or equal to the value of the right operand.
a. <
b. >=
c. <=
d. >

16. A variable declared within a subroutine.


a. Local Variable
b. Global Variable
c. Static
d. Automatic
17. A variable declared in the main program.
a. Local
b. Global
c. Static
d. Automatic

18. Here are some of the rules that we need to follow while declaring a variable in C
EXCEPT:
a. Variables should not be declared with the same name in the same scope.
b. A variable name can start with anything like the alphabet and number.
c. All the declaration statements must end with a semi-colon. ( ; )
d. It is suggested to declare the variables of same data type in the same line.

19. What do the following statement defines?

int *ptr[10];

a. int pointers is a pointer to an array of 10 ptr.


b. ptr is an array of 10 pointers to integers
c. int is an array of 10
d. None of the above

20. The binary equivalent of 50 is,


a. 110010
b. 1010110
c. 101
d. 101.011.00.00
21. Which of the following examples shows how Enum is written?
a. float f= 7.2357
b. char c= ‘a’;
c. int i=5;
d. Enum week {Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday};

22. What is the size of an int data type?


a. 4 bytes
b. 8 bytes
c. cannot be determined
d. depends on the system/compiler

23. What is short in C programming?


a. The basic data type of C
b. Short is the qualifier and the int is the basic data type
c. Qualifier
d. The integer data type that occupies two bytes of memory

24. Which keyword is used to prevent any changes in the variable within a C program?
a. immutable
b. const
c. mutable
d. volatile

25. Which of the data types has the size that is variable?
a. int
b. float
c. struct
d. double
ANSWER KEY
1. C 11. A 21. D
2. B 12. B 22. A
3. A 13. A 23. D
4. D 14. D 24. B
5. D 15. C 25. A
6. D 16. A
7. A 17. B
8. C 18. B
9. A 19. B
10. D 20. A

You might also like