TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ken H
NA
646
360.6k
Some confusion of the character constant
Mar 12 2012 7:02 AM
hi all,
Consider the following problem:
first:
#include<stdio.h>
void main()
{
char ch='\48';
printf("%c\n",ch);
}
//Why the above code output is 8?
second:
#include<stdio.h>
void main()
{
char *s="\ta\018bc";
for(;*s!='\0';s++) printf("*");
}
//Why the above code output is 6 *?
thank very much.
Reply
Answers (
1
)
Ask the prime number algorithm
How to write a countdown program in C + +