ASU CSE 240 MIDTERM
LATEST ACTUAL EXAM WITH VERIFIED QUESTIONS &
CORRECT ANSWERS
Question 1.
(T/F) In C, there is not a class String like in Java or a primitive type String
ANSWER
True
Question 2.
char, unsigned char, signed char and int are all numeric (integer) types in C (T/F)
ANSWER
True
Question 3.
What does the follow code print?
int foo(int *n) {
*n = 30;
}int main() {
int i=15;
foo(&i);
printf("i=%d\n",i);
i=10;
foo(&i);
printf("i=%d\n",i);
return 0;}
ANSWER
i = 30
i = 30
, Question 4.
(T/F) Prolog is a functional programming language?
ANSWER
False
Question 5.
A name given to a storage location that stores an address
ANSWER
Pointer
Question 6.
C++ primitive data types include
ANSWER
float, double, char, int, void and bool
Question 7.
Fixed value that the program may not alter during its execution
ANSWER
Constant
Question 8.
control symbol %s is used for
ANSWER
printing format for strings of characters
Question 9.
Introduces a new name that becomes a synonym for the type given
ANSWER
TYPEDEF: typedef typename(int) newname(boooOlean)
LATEST ACTUAL EXAM WITH VERIFIED QUESTIONS &
CORRECT ANSWERS
Question 1.
(T/F) In C, there is not a class String like in Java or a primitive type String
ANSWER
True
Question 2.
char, unsigned char, signed char and int are all numeric (integer) types in C (T/F)
ANSWER
True
Question 3.
What does the follow code print?
int foo(int *n) {
*n = 30;
}int main() {
int i=15;
foo(&i);
printf("i=%d\n",i);
i=10;
foo(&i);
printf("i=%d\n",i);
return 0;}
ANSWER
i = 30
i = 30
, Question 4.
(T/F) Prolog is a functional programming language?
ANSWER
False
Question 5.
A name given to a storage location that stores an address
ANSWER
Pointer
Question 6.
C++ primitive data types include
ANSWER
float, double, char, int, void and bool
Question 7.
Fixed value that the program may not alter during its execution
ANSWER
Constant
Question 8.
control symbol %s is used for
ANSWER
printing format for strings of characters
Question 9.
Introduces a new name that becomes a synonym for the type given
ANSWER
TYPEDEF: typedef typename(int) newname(boooOlean)