Pointers – Point Out Correct Statements

6. Which of the statements is correct about the program?

Screenshot 1

A. Output: Garbage value
B. Output: 1
C. Output: 3
D. Error: Invalid indirection

Correct Answer: D. Error: Invalid indirection

7. Which statement will you add to the following program to ensure that the program outputs “GkFeed” on execution?

Which statement will you add to the following program to ensure that the program outputs

A. *pt=”;
B. pt=’\0′;
C. pt=’\n’;
D. *pt=’\0′;

Correct Answer: D. *pt=’\0′;

8. In the following program add a statement in the function fact() such that the factorial gets stored in j.

Screenshot 3

A. j=s;
B. *j=s;
C. *j=&s;
D. &j=s;

Correct Answer: B. *j=s;

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

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

Leave A Comment?