good questions of c programming with answer

(q) What will be output of the following program?
#include<stdio.h>
void  main(){
char a='\7',b='\8';
clrscr();
printf("%d  %d",a,b);
getch();
}
Output: 7 56
Explanation:
8 is not octal digit. octal digits are(0,1,2,3,4,5,6,7).
So ‘\7’ is octal 7
‘\8’ some special character constant.
Post a Comment