C programming chapter 1

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

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

a

. Keywords are case sensitive

T

1,234 is a valid integer constant

F

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

c

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

4

A printf statement can generate only one line of output

F

All arithmetic operators have same precedence

F

Any valid printable ASCII character can be used for a variable name

F

Decision control statements are used to repeat the execution of a list of statements

F

Equality operators have higher precedence than the relational operators

F

Signed variables can increase the maximum positive range

F

The calling function always passes parameters to the called function.

F

Underscore can be used anywhere in the variable name.

F

Variable 'first' is the same as 'First'.

F

stdio.h is used to store the source code of the program

F

We can have only one function in a C program

False

. No function can be declared within the body of another function.

T

. Shifting once to the left multiplies the number by 2

T

. The closing brace of main() is the logical end of the program

T

Comment statements are not executed by the compiler.

T

On 32-bit systems, an integer variable is allocated 4 bytes.

T

The & operator retrieves the lvalue of the variable.

T

The declaration section gives instructions to the compute

T

The modulus operator can be used only with integers.

T

The name of a function is global

T

Unary increment and decrement operators have greater precedence than the dereference operator

T

printf("%d", scanf("%d", &num)); is a valid C statement

T

void is a data type in C

T

Memory is allocated for a function when the function is (a) declared (b) defined (c) called (d) returned

b

The operator which compares two values is (a) Assignment (b) Relational (c) Unary (d) Equality

b

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

b

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

b

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

b

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

c

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

c

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

c

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

c

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

d

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

d

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


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

Organizational Behavior Exam 2: Chapters 4-8

View Set

Assignment: Exercise 4.1 (Practice)

View Set

Intro to Psychology Chapters 1-5

View Set

Exam 3 Chapter 17 and 18 Questions

View Set