Assume function doSomething has a string parameter and that it returns an int. Which of these would be valid ways to call the function from Please check all that apply. Wrong answers subtract points. city = doSomething (name); answer = sqrt (doSomething("Bob")); n2 doSomething ("Adele is great!"); %3D cout << doSomething (n1) « endl; cout << doSomething (name); ni = doSomething (name); O O O

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter8: Advanced Method Concepts
Section: Chapter Questions
Problem 8RQ
icon
Related questions
Question
Here is part of the code from the main function in a program:
int n1, n2, n3 = 8;
double answer;
string name = "Homer", city;
Assume function doSomething has a string parameter and that it returns an int. Which of these would be valid ways to call the function from ma
Please check all that apply. Wrong answers subtract points.
O city
= doSomething (name):
answer = sqrt (doSomething ("Bob"));
n2
= doSomething ("Adele is great!");
O cout << doSomething (n1) << end%;
cout < doSomething (name) ;
n1
= doSomething (name):
口ロ
口ロ口
Transcribed Image Text:Here is part of the code from the main function in a program: int n1, n2, n3 = 8; double answer; string name = "Homer", city; Assume function doSomething has a string parameter and that it returns an int. Which of these would be valid ways to call the function from ma Please check all that apply. Wrong answers subtract points. O city = doSomething (name): answer = sqrt (doSomething ("Bob")); n2 = doSomething ("Adele is great!"); O cout << doSomething (n1) << end%; cout < doSomething (name) ; n1 = doSomething (name): 口ロ 口ロ口
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Variables
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
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,