Strings - Find Output of Program :: Discussion


5.What will be the output of the program If characters 'a', 'b' and 'c' enter are supplied as input?
A.abc abc
B.bca
C.Infinite loop
D.cba
Answer:  Option  D
Explanation:

Step 1void fun(); This is the prototype for the function fun().

Step 2fun(); The function fun() is called here.

The function fun() gets a character input and the input is terminated by an enter key(New line character). It prints the given character in the reverse order.

The given input characters are "abc"

Output: cba

Tutorial Link:
Published by:Michael Daani

Comments are not available

Post your comments here:

Optional

Date to Date Current Affairs 2022

PakMCQs.net

Quick Links

GAT Subject



   Computer Science    English Mcqs    Agriculture    

Engineering



   Computer Science    Civil Engineering    

Technical



   Networking    Electronics    Database    

Past Papers



   Model Papers    FPSC Papers