C Programming - C Preprocessor - Discussion


Will the program compile successfully?


int main()
    printf("India" "BIX\n");
    return 0;

[A]. Yes
[B]. No

Answer: Option A


Yes, It prints "IndiaBIX"

Aarti said: (Mar 4, 2012)  
Printf statement will print what you type in double quotations. It will print in one line without any space, untill you give them '\t' or'\n'.

Preeti said: (Dec 19, 2012)  
But is it alright to not give any control string in the printf statement?

Indra said: (Oct 30, 2014)  

int main()
return 0;

Then what is the difference between both?

Sanjay said: (Oct 3, 2017)  
Yes, agree @Indra.

Kishore said: (Aug 15, 2018)  
It does not print "IndiaBIX" it only prints "India".

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.