cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
takes only one input
takes only one input
Sep 22, 2010 at 7:19pm UTC
Aurelio
(8)
main()
{ int i; char c;
for (i=0;i<5;i++) {
scanf("%d",&c);
printf("%d",c); } }
Why the program scans only 1 time if you give an alphabet as an input??
Sep 22, 2010 at 7:22pm UTC
moorecm
(1932)
What happens when you give it a number?
http://www.cplusplus.com/reference/clibrary/cstdio/scanf/
http://www.cplusplus.com/reference/clibrary/cstdio/printf/
Last edited on
Sep 22, 2010 at 7:22pm UTC
Sep 22, 2010 at 7:35pm UTC
Aurelio
(8)
srry, but i didn't get the reason till now...
Topic archived. No new replies allowed.