Functions – Point Out Correct Statements


Warning: Undefined variable $ext in /www/wwwroot/gkfeed.com/public_html/wp-content/plugins/show-hidecollapse-expand/bg_show_hide.php on line 281

Warning: Undefined variable $ext in /www/wwwroot/gkfeed.com/public_html/wp-content/plugins/show-hidecollapse-expand/bg_show_hide.php on line 281

Warning: Undefined variable $ext in /www/wwwroot/gkfeed.com/public_html/wp-content/plugins/show-hidecollapse-expand/bg_show_hide.php on line 281

1. Which of the following statements are correct about the program?

Screenshot 1

A. It prints garbage values infinitely
B. Runs infinitely without printing anything
C. Error: main() cannot be called inside printf()
D. No Error and print nothing

Correct Answer: B. Runs infinitely without printing anything
Advertisement

2. There is an error in the below program. Which statement will you add to remove it?

Screenshot 2

A.  Add prototype: float f(aa, bb)
B.  Add prototype: float f(int, float)
C.  Add prototype: float f(float, int)
D.  Add prototype: float f(bb, aa)

Correct Answer: B.  Add prototype: float f(int, float)
Advertisement

3. Which of the following statements are correct about the function?

Screenshot 3

A. The function calculates the value of 1 raised to power num.
B. The function calculates the square root of an integer
C. The function calculates the factorial value of an integer
D. None of above

Correct Answer: C. The function calculates the factorial value of an integer
Advertisement

Warning: Undefined variable $in_same_cat in /www/wwwroot/gkfeed.com/public_html/wp-content/plugins/EXP.GKFEED.COM/function.php on line 27

Warning: Undefined variable $excluded_categories in /www/wwwroot/gkfeed.com/public_html/wp-content/plugins/EXP.GKFEED.COM/function.php on line 27

Leave A Comment?