1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
crimeas [40]
3 years ago
13

What is accomplished by the call to sprintf in the codefragment below?

Computers and Technology
1 answer:
Sphinxa [80]3 years ago
6 0

Answer:

E. None of the above

Explanation:

char ans[20]

int num = 40;

sprintf(ans, "%d to %d", num, num +10);

This code fragment produce an error,because in 1st line of code char ans[20]  ,there is no semicolon after the line.As ans is undeclared ,the ide will produce an error as we use it in

                   sprintf(<u>ans</u>, "%d to %d", num, num +10);

If we put semicolon after the char ans[20] ,then it will not give error but also don't produce an output because for sprintf we should initialize the num and ans as of pointer type.

It is a condition for sprintf and num should be of string type.

<u>C program </u>

#include <stdio.h>

int main()  

{  

char ans[20];  

int num = 40;  

sprintf(ans, "%d to %d", num, num +10);  

return 0;  

}

<u>Output  </u>

No output  

(You can check this code on any ide for confirmation.)

You might be interested in
True or False. A modern programming EXE provides a text editor, a file manager, a compiler, a linker and loader, and tools for d
Flauer [41]

Answer:

True

Explanation:

Mordern programming environments provide essential tools needed to build, test, debug, etc. examples are VSCode, Atom, Sublime text, etc.

7 0
3 years ago
When using Microsoft word, what would happen to the text of a paragraph if the "Justify" option is used?
Bond [772]
Hello, and thank you for asking your question!

When you click on the 'Justify' option on any type of word pad, it'll make all lines of words perfectly aligned. Here is a quick few-sentence example I made. 
(Photo)

Hope this helps! ☺♥

3 0
3 years ago
Evaluate means having a preference for one thing over another in a way that's unfair.
Zinaida [17]

Answer: False

Explanation:

Bias is have preferences for one thing over another in a way that's unfair.

4 0
3 years ago
How does a author develop a character in a story?
Eva8 [605]
Sometimes they base them off their selves or others they know
3 0
4 years ago
Read 2 more answers
Whe you read anything online how do you know whether or not is coming from a reliable source?
lorasvet [3.4K]

You can find the author and research his/her credibility

You can cross-reference the information to other documentations

You can investigate the credibility of the overall website or community. Teachers like to say that community sites like wikipedia aren't very reliable.

4 0
3 years ago
Read 2 more answers
Other questions:
  • Write programs with loops that compute:
    12·1 answer
  • Multiply 2.7×10^4 by 6.3×10^6​
    13·2 answers
  • Processor speed is a measurement of what?
    10·1 answer
  • This morning when Paul turned on his computer at work, it would not boot. Instead, Paul reported that he heard a loud clicking n
    12·1 answer
  • Aarti, a museum employee, has created a table in access titled “Roman Achitecture”. She has included a field that links users im
    8·1 answer
  • PLEASE HELP I WILL GIVE BRAINLIEST!!
    8·1 answer
  • Who knows my sister better?
    15·2 answers
  • You and a friend have just started a small business. How could you use the Internet to make your business successful?
    15·2 answers
  • Write the following abbreviations in full next to the question number
    15·1 answer
  • Write and test a program that computes the area of a circle. This program should request a number representing a radius as input
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!