CS 159 Lab 2 True or False

0.0(0)
studied byStudied by 0 people
0.0(0)
call with kaiCall with Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/43

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 4:18 AM on 1/28/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

44 Terms

1
New cards

A C program begins with a section for preprocessor directives

T

2
New cards

The preprocessor is a part of the compiling process and prepares your code for the remainder of that process

T

3
New cards

The declaration section contains executable instructions for the computer.

F

4
New cards

The executable section contains executable instructions for the computer.

T

5
New cards

Every program must have exactly one function named main.

T

6
New cards

The main function is the starting point for execution of the program

T

7
New cards

The gcc compiler as found on guru will require that the main be an int (integer) function

T

8
New cards

The gcc compiler as found on guru will require the source code file name to end with a .c extension.

T

9
New cards

Within each function the local declarations and executable statements must NOT be permitted to overlap.

T

10
New cards

All code found in the executable statement and local declaration sections of the main function is considered to

be the body of the function.

T

11
New cards

Variable declarations will NEVER be permitted in the global section this semester

T

12
New cards

The files stdio.h and math.h are libraries that contain standard functions for our use.

T

13
New cards

The return(0); statement will be the final statement in the main function.

T

14
New cards

The return statement in main will return control to the operating system and terminate the current program.

T

15
New cards

Comments are added to a program to improve its level of documentation intended for other programmers.

T

16
New cards

Variables are named memory locations that have a type.

T

17
New cards

Each variable in a C program must be declared and defined before it can be used.

T

18
New cards

It is much easier to find and work with variables if they are defined on separate lines.

T

19
New cards

Variables in the C language are initialized automatically when they are defined

F

20
New cards

Variables in the C language are not initialized automatically but manually when they are defined.

T

21
New cards

The backslash (\) is known as an escape character.

T

22
New cards

A character constant is enclosed in double quotes.

F

23
New cards

A character constant is enclosed in single quotes.

T

24
New cards

A literal constant is an unnamed constant used to specify data

T

25
New cards

The command to create a defined constant is usually placed at the beginning of the program

T

26
New cards

While variables have data types, constants (both literal and defined) do not.

F

27
New cards

While variables have data types, defined constants do not.

T

28
New cards

The conversion code selected for a placeholder (conversion specification) depends on the data type of the

value to be displayed in a printf statement

T

29
New cards

The size modifier is used to specify the minimum number of positions to reserve for the output of a value.

F

30
New cards

The width modifier is used to specify the minimum number of positions to reserve for the output of a value.

T

31
New cards

A precision modifier may be used for the output of any numeric value.

F

32
New cards

A precision modifier may be used for the output of floating value.

T

33
New cards

The width modifier for the output of a value must be large enough to account for the integral value of the

number, the decimal point, and the number of digits in the decimal position.

T

34
New cards

The address list of a scanf function must specify where in the memory of the computer the input should be

stored.

T

35
New cards

Within each function the local declarations and executable statements may be permitted to overlap.

F

36
New cards

Every program must have exactly one function named main.

T

37
New cards

The main function is the starting point for execution of the program.

T

38
New cards

A C program ends with a section for preprocessor directives.

F

39
New cards

The command to create a defined constant is usually placed at the beginning of the program.

T

40
New cards

Variables in the C language are initialized automatically when they are defined.

F

41
New cards

It is much easier to find and work with variables if they are defined on the same line.

F

42
New cards

Only the code found in the executable statement section of the main function is considered to be the body of the function.

F

43
New cards

The conversion code selected for a placeholder (conversion specification) depends on the data type of the value to be displayed in a printf statement.

T

44
New cards

The address list of a scanf function must specify where in the memory of the computer the input should be stored.

T