SlideShare une entreprise Scribd logo
1  sur  1
The function, pow(x, 5.0), requires this header file.
A. cstdlib
B. cmath
C. iostream
D. iomanip
ANSWER: A
This manipulator is used to establish a field width for the value immediately
following it.
A. field_width
B. set_field
C. setw
D. iomanip
ANSWER: A
Assume that x is an int variable. What value is assigned to x after the
following assignment statement is executed x = -3 + 4 % 6 / 5;
A. 0
B. 1
C. 2
D. 3
ANSWER: D
This stream manipulator forces cout to print the digits in fixed-point notation.
A. setprecision(2)
B. setw(2)
C. fixed
D. setfixed(2)
ANSWER: B
Determine the value of the following expression 7 / 3 * (8 % 3 + 3.5)
A. 11
B. 11.0
C. 5.0
D. 8
ANSWER: C
Which of the following lines correctly reads a value from the keyboard and
stores it in the variable named myFloat?
A. cin >> myFloat;
B. cin << myFloat;
C. cin >> "myFloat";
D. cin >> myFloat >> endl;
ANSWER: B
Which of the following is not an example of a program bug?
A. Run-time error
B. Operator error
C. Syntax error
D. Logic error
ANSWER: C

Contenu connexe

Tendances

Pc11-2&11-3 exponential fxns & e notes
Pc11-2&11-3 exponential fxns & e notesPc11-2&11-3 exponential fxns & e notes
Pc11-2&11-3 exponential fxns & e notes
vhiggins1
 
Mcs 10 104 compiler design dec 2014
Mcs 10 104 compiler design dec 2014Mcs 10 104 compiler design dec 2014
Mcs 10 104 compiler design dec 2014
Sreeju Sree
 
Booth’s algorithm.(a014& a015)
Booth’s algorithm.(a014& a015)Booth’s algorithm.(a014& a015)
Booth’s algorithm.(a014& a015)
Piyush Rochwani
 
Methods6 modulus function
Methods6  modulus functionMethods6  modulus function
Methods6 modulus function
kmcmullen
 
Bti1022 lab sheet 8
Bti1022 lab sheet 8Bti1022 lab sheet 8
Bti1022 lab sheet 8
alish sha
 

Tendances (20)

Consider the following C program: int fun(int *i) { *i += 5; return 4; } void...
Consider the following C program: int fun(int *i) { *i += 5; return 4; } void...Consider the following C program: int fun(int *i) { *i += 5; return 4; } void...
Consider the following C program: int fun(int *i) { *i += 5; return 4; } void...
 
Pc11-2&11-3 exponential fxns & e notes
Pc11-2&11-3 exponential fxns & e notesPc11-2&11-3 exponential fxns & e notes
Pc11-2&11-3 exponential fxns & e notes
 
Lab 2-Simple Combinational Logic
Lab 2-Simple Combinational LogicLab 2-Simple Combinational Logic
Lab 2-Simple Combinational Logic
 
Bit manipulation
Bit manipulationBit manipulation
Bit manipulation
 
Subtractor (1)
Subtractor (1)Subtractor (1)
Subtractor (1)
 
Mcs 10 104 compiler design dec 2014
Mcs 10 104 compiler design dec 2014Mcs 10 104 compiler design dec 2014
Mcs 10 104 compiler design dec 2014
 
Bit manipulation
Bit manipulationBit manipulation
Bit manipulation
 
AP Calculus Slides December 12, 2007
AP Calculus Slides December 12, 2007AP Calculus Slides December 12, 2007
AP Calculus Slides December 12, 2007
 
coloring method
 coloring method coloring method
coloring method
 
Test
TestTest
Test
 
Multiplication algorithm, hardware and flowchart
Multiplication algorithm, hardware and flowchartMultiplication algorithm, hardware and flowchart
Multiplication algorithm, hardware and flowchart
 
Booth’s algorithm.(a014& a015)
Booth’s algorithm.(a014& a015)Booth’s algorithm.(a014& a015)
Booth’s algorithm.(a014& a015)
 
Methods6 modulus function
Methods6  modulus functionMethods6  modulus function
Methods6 modulus function
 
Verilog VHDL code Parallel adder
Verilog VHDL code Parallel adder Verilog VHDL code Parallel adder
Verilog VHDL code Parallel adder
 
Ceng232 Decoder Multiplexer Adder
Ceng232 Decoder Multiplexer AdderCeng232 Decoder Multiplexer Adder
Ceng232 Decoder Multiplexer Adder
 
Impact of error
Impact of errorImpact of error
Impact of error
 
Addition and subtraction with signed magnitude data (mano
Addition and subtraction with signed magnitude data (manoAddition and subtraction with signed magnitude data (mano
Addition and subtraction with signed magnitude data (mano
 
Bti1022 lab sheet 8
Bti1022 lab sheet 8Bti1022 lab sheet 8
Bti1022 lab sheet 8
 
Introduction
IntroductionIntroduction
Introduction
 
Function presentation
Function presentationFunction presentation
Function presentation
 

En vedette

Comment Letter on New Regulations Addressing BDPOs -- Letter dated January 3,...
Comment Letter on New Regulations Addressing BDPOs -- Letter dated January 3,...Comment Letter on New Regulations Addressing BDPOs -- Letter dated January 3,...
Comment Letter on New Regulations Addressing BDPOs -- Letter dated January 3,...
Samuel Grilli
 
Q35 maths error quran
Q35 maths error quranQ35 maths error quran
Q35 maths error quran
saud777
 
The better start cr201006 0008 on values workshop-wide
The better start cr201006 0008 on values workshop-wideThe better start cr201006 0008 on values workshop-wide
The better start cr201006 0008 on values workshop-wide
jamescheong
 

En vedette (16)

Comment Letter on New Regulations Addressing BDPOs -- Letter dated January 3,...
Comment Letter on New Regulations Addressing BDPOs -- Letter dated January 3,...Comment Letter on New Regulations Addressing BDPOs -- Letter dated January 3,...
Comment Letter on New Regulations Addressing BDPOs -- Letter dated January 3,...
 
Aluminium dan aloi aluminium
Aluminium dan aloi aluminiumAluminium dan aloi aluminium
Aluminium dan aloi aluminium
 
Cat orgin ofmfr
Cat orgin ofmfrCat orgin ofmfr
Cat orgin ofmfr
 
Kengur
KengurKengur
Kengur
 
zest_issue_2_Travel
zest_issue_2_Travelzest_issue_2_Travel
zest_issue_2_Travel
 
15 mei 2013
15 mei 201315 mei 2013
15 mei 2013
 
Kewirausahaan
KewirausahaanKewirausahaan
Kewirausahaan
 
Q35 maths error quran
Q35 maths error quranQ35 maths error quran
Q35 maths error quran
 
English 7 unit 01 my hobbies lesson 5 skills 1
English 7 unit 01 my hobbies lesson 5 skills 1English 7 unit 01 my hobbies lesson 5 skills 1
English 7 unit 01 my hobbies lesson 5 skills 1
 
Proff presentation
Proff presentationProff presentation
Proff presentation
 
What's a Good Chinese Daily Deal - A Market Analysis - May 2011 - Dataotuan.com
What's a Good Chinese Daily Deal - A Market Analysis - May 2011 - Dataotuan.com What's a Good Chinese Daily Deal - A Market Analysis - May 2011 - Dataotuan.com
What's a Good Chinese Daily Deal - A Market Analysis - May 2011 - Dataotuan.com
 
Gerenciamento de projetos [modo de compatibilidade]
Gerenciamento de projetos [modo de compatibilidade]Gerenciamento de projetos [modo de compatibilidade]
Gerenciamento de projetos [modo de compatibilidade]
 
Caring for Sharring
 Caring for Sharring  Caring for Sharring
Caring for Sharring
 
Portraiture 7
Portraiture 7Portraiture 7
Portraiture 7
 
The better start cr201006 0008 on values workshop-wide
The better start cr201006 0008 on values workshop-wideThe better start cr201006 0008 on values workshop-wide
The better start cr201006 0008 on values workshop-wide
 
Ziemia kielecka 1
Ziemia kielecka 1Ziemia kielecka 1
Ziemia kielecka 1
 

Similaire à Quiz 3 (answer)

M166Calculus” ProjectDue Wednesday, December 9, 2015PROJ.docx
M166Calculus” ProjectDue Wednesday, December 9, 2015PROJ.docxM166Calculus” ProjectDue Wednesday, December 9, 2015PROJ.docx
M166Calculus” ProjectDue Wednesday, December 9, 2015PROJ.docx
infantsuk
 
Project2
Project2Project2
Project2
?? ?
 
bisectionmethod-130831052031-phpapp02.pptx
bisectionmethod-130831052031-phpapp02.pptxbisectionmethod-130831052031-phpapp02.pptx
bisectionmethod-130831052031-phpapp02.pptx
avikkalsa
 
C programming session 01
C programming session 01C programming session 01
C programming session 01
Vivek Singh
 

Similaire à Quiz 3 (answer) (20)

Technical questions
Technical questionsTechnical questions
Technical questions
 
Revision1 C programming
Revision1 C programmingRevision1 C programming
Revision1 C programming
 
Question đúng cnu
Question đúng cnuQuestion đúng cnu
Question đúng cnu
 
Exam for c
Exam for cExam for c
Exam for c
 
C MCQ
C MCQC MCQ
C MCQ
 
important C questions and_answers praveensomesh
important C questions and_answers praveensomeshimportant C questions and_answers praveensomesh
important C questions and_answers praveensomesh
 
Laboratory 7
Laboratory 7Laboratory 7
Laboratory 7
 
Computer programming mcqs
Computer programming mcqsComputer programming mcqs
Computer programming mcqs
 
Quiz1 tonghop
 Quiz1 tonghop Quiz1 tonghop
Quiz1 tonghop
 
Revision1schema C programming
Revision1schema C programmingRevision1schema C programming
Revision1schema C programming
 
B61301007 matlab documentation
B61301007 matlab documentationB61301007 matlab documentation
B61301007 matlab documentation
 
Data Structure and Algorithm
Data Structure and AlgorithmData Structure and Algorithm
Data Structure and Algorithm
 
Redo midterm
Redo midtermRedo midterm
Redo midterm
 
M166Calculus” ProjectDue Wednesday, December 9, 2015PROJ.docx
M166Calculus” ProjectDue Wednesday, December 9, 2015PROJ.docxM166Calculus” ProjectDue Wednesday, December 9, 2015PROJ.docx
M166Calculus” ProjectDue Wednesday, December 9, 2015PROJ.docx
 
Project2
Project2Project2
Project2
 
Chapter 3 : Balagurusamy Programming ANSI in C
Chapter 3 : Balagurusamy Programming ANSI in C Chapter 3 : Balagurusamy Programming ANSI in C
Chapter 3 : Balagurusamy Programming ANSI in C
 
Bisection method
Bisection methodBisection method
Bisection method
 
bisectionmethod-130831052031-phpapp02.pptx
bisectionmethod-130831052031-phpapp02.pptxbisectionmethod-130831052031-phpapp02.pptx
bisectionmethod-130831052031-phpapp02.pptx
 
Soln dc05
Soln dc05Soln dc05
Soln dc05
 
C programming session 01
C programming session 01C programming session 01
C programming session 01
 

Quiz 3 (answer)

  • 1. The function, pow(x, 5.0), requires this header file. A. cstdlib B. cmath C. iostream D. iomanip ANSWER: A This manipulator is used to establish a field width for the value immediately following it. A. field_width B. set_field C. setw D. iomanip ANSWER: A Assume that x is an int variable. What value is assigned to x after the following assignment statement is executed x = -3 + 4 % 6 / 5; A. 0 B. 1 C. 2 D. 3 ANSWER: D This stream manipulator forces cout to print the digits in fixed-point notation. A. setprecision(2) B. setw(2) C. fixed D. setfixed(2) ANSWER: B Determine the value of the following expression 7 / 3 * (8 % 3 + 3.5) A. 11 B. 11.0 C. 5.0 D. 8 ANSWER: C Which of the following lines correctly reads a value from the keyboard and stores it in the variable named myFloat? A. cin >> myFloat; B. cin << myFloat; C. cin >> "myFloat"; D. cin >> myFloat >> endl; ANSWER: B Which of the following is not an example of a program bug? A. Run-time error B. Operator error C. Syntax error D. Logic error ANSWER: C