+ 2

int main{printf("%%%%"); return 0;}

Why output of this program would be '%%'

2nd May 2020, 12:01 PM
Arnab Pratihar
Arnab Pratihar - avatar
1 ответ
+ 2
C compiler treats % as format specifier in printf so to print % using printf u have to use %% so printf("%%%%") outputs %% Similarly for %% it outputs % for %%%%%% it outputs %%%
2nd May 2020, 1:23 PM
Nandan
Nandan - avatar