Deck 10: Developing Unix-Linux Applications in C and C

Full screen (f)
exit full mode
Question
fgetch()reads a single character from the file and points to it.
Use Space or
up arrow
down arrow
to flip the card.
Question
The C language was partly developed to resolve the more lengthy requirements of assembly language.
Question
Dennis Ritchie and Brian Kernighan rewrote most of UNIX using C++ in the early 1960s.
Question
The original UNIX operating system was written in ____.

A)C
B)C++
C)assembly language
D)Awk
Question
____ is an example of how you can declare a string in C.

A)string name;
B)string name[20];
C)String name;
D)char name[20];
Question
The output of a linker is a(n)____ file.

A)executable
B)binary
C)object
D)source code
Question
C++ uses -- to denote a comment line.
Question
____ have special meanings,so you cannot use them as names for variables or functions.

A)Labels
B)Tags
C)Constants
D)Keywords
Question
A compiler is a program that translates the source code into ____ code,which consists of binary instructions.

A)compiled
B)binary
C)binary
D)object
Question
When you represent character data in a program as a character constant,you enclose the character in ____.

A)curly braces
B)angle braces
C)single quotation marks
D)double quotation marks
Question
A variable's data type determines the upper and lower limits of its range of values.
Question
A(n)____ is a group of characters,such as a name.

A)array
B)string
C)scalar
D)hash
Question
When you use string constants in your C program,they must be enclosed in ____.

A)curly braces
B)angle braces
C)single quotation marks
D)double quotation marks
Question
____ is a low-level language that provides maximum access to all the computer's devices,both internal and external.

A)C
B)C++
C)Assembly language
D)Awk
Question
Unlike many other library input functions,readf()can be used to input values of a variety of data types.
Question
The ____ data type occupies a single byte.

A)char
B)int
C)float
D)double
Question
The word "null" is used to indicate that a function returns no data.
Question
You can use three modifiers with int data types: short,long,and ____.

A)scalar
B)unsigned
C)array
D)double
Question
C can be described as a language that uses relatively short,isolated functions to break down large,complex tasks into small and easily resolved subtasks.
Question
____ is the language in which UNIX was developed and refined.

A)C
B)C++
C)Perl
D)Awk
Question
A C program consists of separate bodies of code,known as ____________________.
Question
The ____ format specifier is used to denote a floating point number in decimal notation.

A)%c
B)%d
C)%u
D)%f
Question
Match each item with a statement below.
a.main()
f.stdio.h
b.
a.out
g.{
c.null
h.gcc
d.%
i.#include
e./*
denotes the beginning of a block of code
Question
The decrement operator is a(n)____ operator.

A)unary
B)binary
C)primary
D)arbitrary
Question
When you ____________________ a function,you declare the function's name and create the lines of code that make up the function's block of code.
Question
The ____ utility tracks what needs to be recompiled by using the time stamp field for each source file.

A)compile
B)gcc
C)configure
D)make
Question
Automatic variables are ____ to the function in which they are declared.

A)global
B)assigned
C)local
D)unique
Question
C provides three looping mechanisms: the for loop,the while loop,and the ____ loop.

A)do-while
B)switch
C)while-do
D)repeat-until
Question
The ____ format specifier is used to denote a signed decimal integer.

A)%c
B)%d
C)%f
D)%s
Question
Match each item with a statement below.
a.main()
f.stdio.h
b.
a.out
g.{
c.null
h.gcc
d.%
i.#include
e./*
executable file which,by default,contains a compiled C program
Question
____ are continuous streams of data.

A)Arrays
B)Strings
C)Files
D)Pointers
Question
The ____ of a variable is the part of the program in which the variable is defined and,therefore,accessible.

A)aim
B)reach
C)length
D)scope
Question
C's ____________________ header file contains information the compiler needs to process standard input or output statements.
Question
____________________ are names given to variables and functions.
Question
C's increment operator is ____.

A)++
B)+
C)+=
D)=+
Question
Variables that are declared inside a function are called ____ variables.

A)global
B)automatic
C)scalar
D)independent
Question
Many compilers translate source code into assembly code.This requires that a(n)____________________ be called up to translate the assembly code into object code.
Question
The ____ scanf()format specifier is used to indicate that scanf()should interpret the input value as a pointer.

A)%p
B)%P
C)%r
D)%R
Question
Match each item with a statement below.
a.main()
f.stdio.h
b.
a.out
g.{
c.null
h.gcc
d.%
i.#include
e./*
every C program must contain this function
Question
C++ enables function ____________________,which makes the functions respond to more than one set of criteria and conditions.
Question
What is the role of the C preprocessor?
Question
What is the role of the control string in the printf()function?
Question
What is the role of the if statement?
Question
Match each item with a statement below.
a.main()
f.stdio.h
b.
a.out
g.{
c.null
h.gcc
d.%
i.#include
e./*
command for the C compiler in Linux operating systems
Question
Provide at least three rules that should be followed when naming variables in C.
Question
What is the scope of a global variable?
Question
What is the role of a linker program?
Question
What is the difference between the while loop and the do-while loop?
Question
What is a daemon?
Question
Match each item with a statement below.
a.main()
f.stdio.h
b.
a.out
g.{
c.null
h.gcc
d.%
i.#include
e./*
denotes the beginning of a comment
Question
What is an object?
Question
Match each item with a statement below.
a.main()
f.stdio.h
b.
a.out
g.{
c.null
h.gcc
d.%
i.#include
e./*
is a header file
Question
Match each item with a statement below.
a.main()
f.stdio.h
b.
a.out
g.{
c.null
h.gcc
d.%
i.#include
e./*
is a preprocessor directive
Question
Match each item with a statement below.
a.main()
f.stdio.h
b.
a.out
g.{
c.null
h.gcc
d.%
i.#include
e./*
modulus operator
Question
What does the C library contain?
Question
Match each item with a statement below.
a.main()
f.stdio.h
b.
a.out
g.{
c.null
h.gcc
d.%
i.#include
e./*
a single byte in which all bits are set to zero
Question
What is the role of a function prototype?
Question
What is a source code file?
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/58
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 10: Developing Unix-Linux Applications in C and C
1
fgetch()reads a single character from the file and points to it.
False
2
The C language was partly developed to resolve the more lengthy requirements of assembly language.
True
3
Dennis Ritchie and Brian Kernighan rewrote most of UNIX using C++ in the early 1960s.
False
4
The original UNIX operating system was written in ____.

A)C
B)C++
C)assembly language
D)Awk
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
5
____ is an example of how you can declare a string in C.

A)string name;
B)string name[20];
C)String name;
D)char name[20];
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
6
The output of a linker is a(n)____ file.

A)executable
B)binary
C)object
D)source code
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
7
C++ uses -- to denote a comment line.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
8
____ have special meanings,so you cannot use them as names for variables or functions.

A)Labels
B)Tags
C)Constants
D)Keywords
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
9
A compiler is a program that translates the source code into ____ code,which consists of binary instructions.

A)compiled
B)binary
C)binary
D)object
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
10
When you represent character data in a program as a character constant,you enclose the character in ____.

A)curly braces
B)angle braces
C)single quotation marks
D)double quotation marks
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
11
A variable's data type determines the upper and lower limits of its range of values.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
12
A(n)____ is a group of characters,such as a name.

A)array
B)string
C)scalar
D)hash
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
13
When you use string constants in your C program,they must be enclosed in ____.

A)curly braces
B)angle braces
C)single quotation marks
D)double quotation marks
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
14
____ is a low-level language that provides maximum access to all the computer's devices,both internal and external.

A)C
B)C++
C)Assembly language
D)Awk
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
15
Unlike many other library input functions,readf()can be used to input values of a variety of data types.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
16
The ____ data type occupies a single byte.

A)char
B)int
C)float
D)double
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
17
The word "null" is used to indicate that a function returns no data.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
18
You can use three modifiers with int data types: short,long,and ____.

A)scalar
B)unsigned
C)array
D)double
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
19
C can be described as a language that uses relatively short,isolated functions to break down large,complex tasks into small and easily resolved subtasks.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
20
____ is the language in which UNIX was developed and refined.

A)C
B)C++
C)Perl
D)Awk
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
21
A C program consists of separate bodies of code,known as ____________________.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
22
The ____ format specifier is used to denote a floating point number in decimal notation.

A)%c
B)%d
C)%u
D)%f
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
23
Match each item with a statement below.
a.main()
f.stdio.h
b.
a.out
g.{
c.null
h.gcc
d.%
i.#include
e./*
denotes the beginning of a block of code
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
24
The decrement operator is a(n)____ operator.

A)unary
B)binary
C)primary
D)arbitrary
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
25
When you ____________________ a function,you declare the function's name and create the lines of code that make up the function's block of code.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
26
The ____ utility tracks what needs to be recompiled by using the time stamp field for each source file.

A)compile
B)gcc
C)configure
D)make
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
27
Automatic variables are ____ to the function in which they are declared.

A)global
B)assigned
C)local
D)unique
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
28
C provides three looping mechanisms: the for loop,the while loop,and the ____ loop.

A)do-while
B)switch
C)while-do
D)repeat-until
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
29
The ____ format specifier is used to denote a signed decimal integer.

A)%c
B)%d
C)%f
D)%s
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
30
Match each item with a statement below.
a.main()
f.stdio.h
b.
a.out
g.{
c.null
h.gcc
d.%
i.#include
e./*
executable file which,by default,contains a compiled C program
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
31
____ are continuous streams of data.

A)Arrays
B)Strings
C)Files
D)Pointers
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
32
The ____ of a variable is the part of the program in which the variable is defined and,therefore,accessible.

A)aim
B)reach
C)length
D)scope
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
33
C's ____________________ header file contains information the compiler needs to process standard input or output statements.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
34
____________________ are names given to variables and functions.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
35
C's increment operator is ____.

A)++
B)+
C)+=
D)=+
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
36
Variables that are declared inside a function are called ____ variables.

A)global
B)automatic
C)scalar
D)independent
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
37
Many compilers translate source code into assembly code.This requires that a(n)____________________ be called up to translate the assembly code into object code.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
38
The ____ scanf()format specifier is used to indicate that scanf()should interpret the input value as a pointer.

A)%p
B)%P
C)%r
D)%R
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
39
Match each item with a statement below.
a.main()
f.stdio.h
b.
a.out
g.{
c.null
h.gcc
d.%
i.#include
e./*
every C program must contain this function
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
40
C++ enables function ____________________,which makes the functions respond to more than one set of criteria and conditions.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
41
What is the role of the C preprocessor?
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
42
What is the role of the control string in the printf()function?
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
43
What is the role of the if statement?
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
44
Match each item with a statement below.
a.main()
f.stdio.h
b.
a.out
g.{
c.null
h.gcc
d.%
i.#include
e./*
command for the C compiler in Linux operating systems
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
45
Provide at least three rules that should be followed when naming variables in C.
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
46
What is the scope of a global variable?
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
47
What is the role of a linker program?
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
48
What is the difference between the while loop and the do-while loop?
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
49
What is a daemon?
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
50
Match each item with a statement below.
a.main()
f.stdio.h
b.
a.out
g.{
c.null
h.gcc
d.%
i.#include
e./*
denotes the beginning of a comment
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
51
What is an object?
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
52
Match each item with a statement below.
a.main()
f.stdio.h
b.
a.out
g.{
c.null
h.gcc
d.%
i.#include
e./*
is a header file
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
53
Match each item with a statement below.
a.main()
f.stdio.h
b.
a.out
g.{
c.null
h.gcc
d.%
i.#include
e./*
is a preprocessor directive
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
54
Match each item with a statement below.
a.main()
f.stdio.h
b.
a.out
g.{
c.null
h.gcc
d.%
i.#include
e./*
modulus operator
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
55
What does the C library contain?
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
56
Match each item with a statement below.
a.main()
f.stdio.h
b.
a.out
g.{
c.null
h.gcc
d.%
i.#include
e./*
a single byte in which all bits are set to zero
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
57
What is the role of a function prototype?
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
58
What is a source code file?
Unlock Deck
Unlock for access to all 58 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 58 flashcards in this deck.