What will the result of DIVIDE(9 + 6, 3) be if DIVIDE is defined as follows?
#define DIVIDE(A, B) A / B
Quiz 5 Review
Quiz
•
Science
•
University
•
Medium
Anastasiya Masalava
Used 25+ times
FREE Resource
22 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What will the result of DIVIDE(9 + 6, 3) be if DIVIDE is defined as follows?
#define DIVIDE(A, B) A / B
2
5
11
DIVIDE(9 + 6, 3) would cause a compiler error.
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What will the following code print
#define FOO -3
#if FOO
printf("Oranges ");
#else
printf("Bananas ");
#endif
Oranges
Bananas
Oranges Bananas
This code will not compile
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What lines of code will prevent contents of header file "stuff" from being included more than once?
#ifdef STUFF_H
#define STUFF_H
#endif
Contents of stuff.h
#ifndef STUFF_H
#define STUFF_H
#endif
Contents of stuff.h
#ifdef STUFF_H
#define STUFF_H
Contents of stuff.h
#endif
#ifndef STUFF_H
#define STUFF_H
Contents of stuff.h
#endif
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code print?
char myChar = 'A';
printf("%d", myChar);
'A'
The ASCII value of A
The address of 'A'
This code will cause a compiler error.
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What will the following code print?
int a = 0x22;
a += 7
printf("%d", a);
29
0x29
41
It will not compile
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What will the following code print?
int gpa =4;
gpa <<= 1;
gpa = gpa ^ (gpa - 4);
printf("%d", gpa);
0
4
8
12
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
(T/F) If we had an integer a, ++a and a++ are functionally identical.
True
False
20 questions
CS211 Bài 3
Quiz
•
University
20 questions
Animal Cells
Quiz
•
9th Grade - University
26 questions
untitled
Quiz
•
1st Grade - University
25 questions
Quiz Elektronika 1
Quiz
•
University
25 questions
ELCT 145-248349P - Basic Electronics Exam Prep Quiz
Quiz
•
University
20 questions
Python 101
Quiz
•
University
25 questions
International Airport of India
Quiz
•
University
25 questions
Functions
Quiz
•
7th Grade - University
15 questions
Multiplication Facts
Quiz
•
4th Grade
20 questions
Math Review - Grade 6
Quiz
•
6th Grade
20 questions
math review
Quiz
•
4th Grade
5 questions
capitalization in sentences
Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance
Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions
Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines
Quiz
•
Professional Development
12 questions
Dividing Fractions
Quiz
•
6th Grade