Programming Languages
C
Objective
Mar 08, 2013
What will be output of the following c code?
#include "stdio.h"
#include "string.h"
void main()
{
char c='\08';
printf("%d",c);
}
Detailed Explanation
In c any character is starting with character ‘\’ represents octal number in character. As we know octal digits are: 0, 1, 2, 3, 4, 5, 6, and 7. So 8 is not an octal digit. Hence ‘\08’ is invalid octal character constant.
Discussion (0)
No comments yet. Be the first to share your thoughts!
Share Your Thoughts