Strings - Find Output of Program :: Discussion


20.What will be the output of the program?
A.Base address of str
B.PakMCQs
C.No Output
D.Error
Answer:  Option  D
Explanation:

The line char str = "PakMCQs"; generates "Non portable pointer conversion" error.

To eliminate the error, we have to change the above line to

char *str = "PakMCQs"; (or) char str[] = "PakMCQs";

Then it prints "PakMCQs".

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