A few days ago
I have a homework on TurboC.?
What is the output in TurboC of the following statements: Note, letter=A
1)Printf (“Letter is: %C”, letter);
2)Printf (“Alpha is \n: %C”, letter);
3)Printf (“I %CM CUTE, % letter);
4)Printf (“\t %C”, letter);
5)Printf (“%C %C %C”, letter, letter, letter
6)Printf (“Letter value is: %d”, letter);
7)Printf (“Answer: %d”, ‘B’-‘A’);
Top 2 Answers
A few days ago
Favorite Answer
You can find out in about 5 seconds if you have the compiler. You do have the compiler, right?
1) Letter is: A
2) Alpha is
3) error, no closing quote
4)
5) A A A
6) Letter value is: 0
(or, above causes datatype error)
7) Answer: 1
1
A few days ago
I believe for 6 you’d actually get the ASCII value of A – 65 – but it’s been awhile since I used printf. As the other poster suggested, there’s nothing like trying them out to see what happens.
1
- Academic Writing
- Accounting
- Anthropology
- Article
- Blog
- Business
- Career
- Case Study
- Critical Thinking
- Culture
- Dissertation
- Education
- Education Questions
- Essay Tips
- Essay Writing
- Finance
- Free Essay Samples
- Free Essay Templates
- Free Essay Topics
- Health
- History
- Human Resources
- Law
- Literature
- Management
- Marketing
- Nursing
- other
- Politics
- Problem Solving
- Psychology
- Report
- Research Paper
- Review Writing
- Social Issues
- Speech Writing
- Term Paper
- Thesis Writing
- Writing Styles