Question 18 Study the following code segment and identify the line number that will cause a syntax error void Test (char &c, double d, int x){//Line 1 c = static_cast(d + x); c = c % 128; //Line 2 //Line 3 } int main() { //Line 4 //Line 5 double d = 100.8; char chl 'd'; //Line 6 //Line 7 //Line 8 int i Test (chl,d, chl); cout<

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter3: Performing Calculations With Formulas And Functions
Section: Chapter Questions
Problem 4.7CP
icon
Related questions
Topic Video
Question

C++

Question 18
Study the following code segment and identify the line number that will cause a syntax
error
void Test (char &c, double d, int x){//Line 1
c = static_cast<int>(d + x);
c = c % 128;
//Line 2
//Line 3
}
int main() {
//Line 4
//Line 5
double d = 100.8;
char chl
'd';
//Line 6
//Line 7
//Line 8
int i
Test (chl,d, chl);
cout<<chl + i;
}
O Line 6
O Line 1
Line 3
O Line 8
O Line 5
O Line 7
O Line 2
Transcribed Image Text:Question 18 Study the following code segment and identify the line number that will cause a syntax error void Test (char &c, double d, int x){//Line 1 c = static_cast<int>(d + x); c = c % 128; //Line 2 //Line 3 } int main() { //Line 4 //Line 5 double d = 100.8; char chl 'd'; //Line 6 //Line 7 //Line 8 int i Test (chl,d, chl); cout<<chl + i; } O Line 6 O Line 1 Line 3 O Line 8 O Line 5 O Line 7 O Line 2
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Instruction Format
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage