You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Discussion forum for Introduction to Programming in C
if a program has scanf("%d",&a) when i give character input why cant it take the asccii value of the character which is an int and store it in a instead showing error
eg if i give input as A its ascii value 65 can be stored in a why there is an error
NOC20 CS91
unread,
Aug 3, 2020, 1:54:38 PM8/3/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Discussion forum for Introduction to Programming in C
Hi,
Because you are using %d in scanf which expects an integer value as input. If you are interested in ASCII value of character. Use the below code: