Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
132 views
in Functions by (29.6k points)
closed by

The following are function calling statements. Some of them will be executed, while some other generate compilation error. Write down your opinion on each of them with proper justification Function 

1. har ch = 

2. sqrt(25); 

3. strcat (“Computer”, “Program”); 

4. double num = pow(2,3,5) 

5. putchar(getchar());

1 Answer

+1 vote
by (29.8k points)
selected by
 
Best answer

1. getch get a character from the console(keyboard) but does not echo to the screen. So we can’t read a character from the console. 

2. It returns the square root of 25. 

3. It concatenates Program to computer, i.e. we will get a string “computer program”

4. The function pow should contains only two arguments. But here it contains 3 arguments so it is an error. We can write this function as follows Double num = pow(pow(2,3),5) 

5. It reads a character from the console and display it on the screen.

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

...