CSI 2290 - Chapter 1 Multiple Choice, True or False, and Fill In the Blank from the Book (Intro to C)

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

______________ causes the cursor to move to the next line.

New line (\n)

Which operator cannot be used with floating point numbers? a. + b. - c. % d. *

c. %

Ternary operator operates on how many operands? a. 1 b. 2 c. 3 d. 4

c. 3

*(&num) is equivalent to writing a. &num b. *num c. num d. None of these

c. num

Identify the erroneous expression. a. X=y=2, 4; b. res = ++a * 5; c. res = /4; d. res = a++ -b *2;

c. res=/4;

Which return type cannot return any value to the calling function? a. int b. float c. void d. double

c. void

In ______________ method, address of the variable is passed by the calling function to the called function.

call by reference

A function that uses another function is known as the ________________________.

calling function

After the function is executed, the control passes back to the ___________.

calling function

A C program ends with a ________.

closing bracket

The _____________ specification is used to read/write a short integer.

%hd

The ___________________ specification is used to read/write a hexadecimal integer.

%x

To print the data left-justified, _______________ specification is used.

-

Size of character pointer is ______________.

1 Byte

In the memory, characters are stored as _______________.

ASCII codes

___________ is executed when the value of the variable does not match with any of the values of the case statement.

Default statement/case

C was developed by ______________.

Dennis Ritchie

True or False: 1,234 is a valid integer constant.

False

True or False: A printf statement can generate only 1 line of output

False

True or False: All arithmetic operators have the same precedence.

False

True or False: Any valid printable ASCII character can be used for a variable name.

False

True or False: Decision control statements are used to repeat the execution of a list of statements.

False

True or False: Equality operators have higher precedence than the relational operators.

False

True or False: Signed variables can increase the maximum positive range.

False

True or False: Stdio.h is used to store the source code of a program.

False

True or False: The calling function always passes parameters to the called function.

False

True or False: Underscore can be used anywhere in the variable name.

False

True or False: Variable 'first' is the same as variable 'First'.

False

True or False: We can have only one function in a C program.

False

____________ pointer does not point to any valid memory address.

Null

_______________ prints data on the monitor

Printf()

__________________ operator returns the number of bytes occupied by the operand.

Sizeof

___________________ finds the remainder of integer division.

The modulus operator (%)

True or False: Comment statements are not executed by the compiler.

True

True or False: Keywords are case sensitive.

True

True or False: No function can be declared within the body of another function.

True

True or False: On 32 bit systems, an integer variable is allocated 4 bytes.

True

True or False: Shifting once to the left multiplies the number by 2.

True

True or False: The & operator receives the lvalue of the variable.

True

True or False: The closing brace of main() is the logical end of the program.

True

True or False: The declaration section gives instructions to the computer.

True

True or False: The modulus operator can only be used with integers.

True

True or False: The name of a function is global.

True

True or False: Unary increment and decrement operators have greater precedence than dereference operator.

True

True or False: Void is a data type in C.

True

True or False: printf("%d", scanf("%d", &num)); is a valid C statement.

True

_______________ is also known as forced conversion.

Typecasting

Which operator retrieves the lvalue of a variable? a. & b. * c. -> d. None of these

a. &

The inputs that the function takes are known as ____________________.

arguments/parameters

Which of the following is not a character constant? a. 'A' b. "A" c. '' d. '*'

b. "A"

Which of the following is the conversion character associated with short integer? a. %c b. %h c. %e d. %f

b. %h

Which operator is used to dereference a pointer? a. & b. * c. -> d. None of these

b. *

The operator which compares 2 values is: a. Assignment b. Relational c. Unary d. Equality

b. Relational

Memory is allocated for a function when the function is ________. a. declared b. defined c. called d. returned

b. defined

A variable can be made constant by declaring it with the qualifier ___________ at the time of initialization.

const

Function declaration statement identifies a function with its a. Name b. Arguments c. Data type of return value d. All of these

d. All of these

Which operator produces the one's complement of the given binary value? a. Logical AND b. Bitwise AND c. Logical OR d. Bitwise NOT

d. Bitwise Not

Which operator has the lowest precedence? a. Sizeof b. Unary c. Assignment d. Comma

d. Comma

Which of the following is a valid variable name? a. Initial.Name b. A+B c. $amt d. Floats

d. Floats

The ________________ operator informs the compiler that the variable is a pointer variable.

dereference (*)

Function definition consists of ______________ and _________________.

function header ; function body

The execution of a C program begins at _________________.

main()

return 0 returns 0 to the ______________.

operating system

The ___________ appears on the right side of the assignment operator.

rvalue

sizeof is a _____________ operator used to calculate the size of data types.

unary


संबंधित स्टडी सेट्स

Psychology & Language: Chapter 5 Quiz

View Set

Chapter 54 Care of the patient with the Esophageal Problems

View Set

Chapter 10 - The Water-Soluble Vitamins: B Vitamins and Vitamin C

View Set

SPLDV : shooting M3 : menentukan HP dan menyelesaikan masalah kontekstual

View Set

Antidysrhythmics- Pharmacology- Evolve

View Set

Sociology-Quiz Questions (Quizzes 5-7)

View Set

Chapter 6: Substance Use Assessment

View Set

Chapter 1: Economic Foundations and Models Quiz

View Set