NOS 120 Final Chap sol 6-10 UPDATED ACTUAL QUESTIONS AND CORRECT
ANSWERS
A new programmer whom you are training is writing a C Use / at the beginning of the comments and / at the end.
program and he wants to place comment lines in
the program. Which of the following characters should be
used at the beginning and end of the comments?
You've written a C program, but are now getting an error You omitted the preprocessor directive for the file stdio.h
message about the use of standard input and
output statements when you compile the program. Which
of the following might be the cause?
Which of the following is in the proper format for a 'C' and 'c'
character constant?
Which of the following are performed by functions in the a. screen operations, b. memory allocation operations, c. file operations, and d.
C library? math
operations
A daemon is a _ specialized system process that runs in the background
A colleague of yours is just learning to use the C a.out
compiler in Linux. When she tries to compile a program
called firststart.c using gcc firststart.c she is expecting the
executable file to have the name firststart, but
there is no firststart file. What is the executable file's
name?
, You have written a C program using the variables num, enum and long are keywords and cannot be used as variables
enum, sum, and long. When you compile the
program you get an error message about using a variable
the compiler finds unacceptable. Which of the
following is likely to be the problem?
Which of the following are examples of data types in the int, double, float
C language?
Which of the following is the right way to use the string "Enter your ID:"
constant, Enter your ID:, in the C language?
Which of the following functions must be in a C program? main()
Which of the following statements enables you to print cout << "File updated.\n";
File updated on the screen when a C++ program is
finished?
Which of the following are important characteristics of object-oriented programming and c. use of classes for specialized programming
C++ programming? needs
Your program to calculate values in physics requires short int
working with positive and negative whole numbers
between -14,242 and 12,528. What data types would you
use to work with these numbers in a C program?
In your C program, you want to use a while loop and counter--;
decrement the value, counter, each time the program
goes through the while loop. Which of the following
operators enables you to decrement the value in
counter?
Which of the following functions is used to open a file in fopen()
the C language?
What started as a simple C program has now turned into Use the make utility and create makefiles.
several program modules as you have refined it
over the past several months. The problem is that now
you do not always remember which modules you
have changed at what time. What should you do?
What compiler is started by using the g++ command? the C++ compiler
The programmer you are training wants to write code to feof()
determine when the end of a file has been reached.
Which of the following can he use?
Your C++ program needs to access the system date in <ctime> library
different ways. Which of the following enables you
to do this?
ANSWERS
A new programmer whom you are training is writing a C Use / at the beginning of the comments and / at the end.
program and he wants to place comment lines in
the program. Which of the following characters should be
used at the beginning and end of the comments?
You've written a C program, but are now getting an error You omitted the preprocessor directive for the file stdio.h
message about the use of standard input and
output statements when you compile the program. Which
of the following might be the cause?
Which of the following is in the proper format for a 'C' and 'c'
character constant?
Which of the following are performed by functions in the a. screen operations, b. memory allocation operations, c. file operations, and d.
C library? math
operations
A daemon is a _ specialized system process that runs in the background
A colleague of yours is just learning to use the C a.out
compiler in Linux. When she tries to compile a program
called firststart.c using gcc firststart.c she is expecting the
executable file to have the name firststart, but
there is no firststart file. What is the executable file's
name?
, You have written a C program using the variables num, enum and long are keywords and cannot be used as variables
enum, sum, and long. When you compile the
program you get an error message about using a variable
the compiler finds unacceptable. Which of the
following is likely to be the problem?
Which of the following are examples of data types in the int, double, float
C language?
Which of the following is the right way to use the string "Enter your ID:"
constant, Enter your ID:, in the C language?
Which of the following functions must be in a C program? main()
Which of the following statements enables you to print cout << "File updated.\n";
File updated on the screen when a C++ program is
finished?
Which of the following are important characteristics of object-oriented programming and c. use of classes for specialized programming
C++ programming? needs
Your program to calculate values in physics requires short int
working with positive and negative whole numbers
between -14,242 and 12,528. What data types would you
use to work with these numbers in a C program?
In your C program, you want to use a while loop and counter--;
decrement the value, counter, each time the program
goes through the while loop. Which of the following
operators enables you to decrement the value in
counter?
Which of the following functions is used to open a file in fopen()
the C language?
What started as a simple C program has now turned into Use the make utility and create makefiles.
several program modules as you have refined it
over the past several months. The problem is that now
you do not always remember which modules you
have changed at what time. What should you do?
What compiler is started by using the g++ command? the C++ compiler
The programmer you are training wants to write code to feof()
determine when the end of a file has been reached.
Which of the following can he use?
Your C++ program needs to access the system date in <ctime> library
different ways. Which of the following enables you
to do this?