Question

QUESTION 28 In C, when printing data to either the computer screen or to an output file, what character is used to left justi
0 0
Add a comment Improve this question Transcribed image text
Answer #1

In C, '-' character is used to left justify the data in when printing the data. After '-' we specify the length of the number of spaces we want in our data.

1 #include <stdio.h> OWN int main(void) { char c[] = HomeworkLib; printf(No justification <s>\n,c); printf(Right justificationOutput No justification <HomeworkLib> Right justification HomeworkLib> Left justification <HomeworkLib >  

Add a comment
Know the answer?
Add Answer to:
QUESTION 28 In C, when printing data to either the computer screen or to an output...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • The correct C statement to close an input or output file is closef. True False In...

    The correct C statement to close an input or output file is closef. True False In C, fscanf() is used to: print data to the computer screen. read in data from a file. read input from the keyboard. write data to a file. To read data from an input file in C, you would use: scaff fscanff fscan fscanf What is the C statement required to send output to a data file? fprintf printff printf writef When a file nointer...

  • Write a program in c++ that generates a 100 random numbers between 1 and 1000 and...

    Write a program in c++ that generates a 100 random numbers between 1 and 1000 and writes them to a data file called "randNum.dat". Then re-open the file, read the 100 numbers, print them to the screen, and find and print the minimum and maximum values. Specifications: If your output or input file fails to open correctly, print an error message that either states: Output file failed to open Input file failed to open depending on whether the output or...

  • Description Write C++ code that correctly input and output information. (Moving data to and from the...

    Description Write C++ code that correctly input and output information. (Moving data to and from the screen and to and from text files. Also inputting predefined functions, etc., from included libraries.) Problem Description Consider a data file that has geometrical angle values in degrees. Angle values may be on one line, several lines, or any other white space separated format. Fig. 1 below shows one possible format, but other formats are possible. 12.9 100.8 270.5 300.6 120.8 There are no...

  • Question 1 The code used to output messages to the screen begins with run # print...

    Question 1 The code used to output messages to the screen begins with run # print output Flag this Question Question 2 The code used to begin a comment in the Python program source code is # Hello * Comment Flag this Question Question 3 A variable name is like a(n) input typed on a keyboard address in computer memory where values can be stored output to a computer screen value assigned to an address in computer memory Flag this...

  • computer science questions 13. What is the value of the expression that follows? strcmp ("dog", "dogs");...

    computer science questions 13. What is the value of the expression that follows? strcmp ("dog", "dogs"); 0 nosodo none of the above 14. What is the value of the expression that follows? strcmp ("dog", "Dog"); a. -1 e. '10' none of the above 15. Which character is used to left justify the string argument in printf? 0 \left 16. To test whether a character is one of '0', '1', '2', '3', '4', '5', '6', '7', '8', or '9', use the...

  • in c++ language, using quincy compiler Write a program that will read in 12 characters from...

    in c++ language, using quincy compiler Write a program that will read in 12 characters from the keyboard between a – z in lowercase. These letters will be inserted into a queue (imported from the Queue.h header file). When the 12th character has been entered, the queue will serve the characters one at a time to a character variable, which will push the values, one at a time, into a stack (using code imported from the Stack.h header file) and...

  • Participants sit in front of a computer in an empty room and click a button when they see a particular color show up on the screen. Researchers collect data across hundreds of participants, recording...

    Participants sit in front of a computer in an empty room and click a button when they see a particular color show up on the screen. Researchers collect data across hundreds of participants, recording the time it takes to react to various colors presented on the screen. a)quasi-experiment b)questionaire c)laboratory d)ethnography

  • QUESTION 6 Please match questions (definitions) with answers - A computer designed to be used by...

    QUESTION 6 Please match questions (definitions) with answers - A computer designed to be used by one person at a time, commonly connected to a LAN and run multi-user operating systems - Main residential program that coordinates all hardware and software activity and provide interface for User (GUI). A collection of information stored as one unit with one name. 1. Algorithm 2. File 3. Operating System 4. End User workstation - Sequence of connected instructions that describes behavior of any...

  • Write a C++ program that will read in image data from the file "image.txt" and illustrate...

    Write a C++ program that will read in image data from the file "image.txt" and illustrate that image as ASCII art. The Image file will contain several lines, representing horizontal rows in the image, and each line will have several integers in the range 0-255. representing povels, separated by spaces. You should read this image data into a vector vector in Once you've read in the phel data, go through the image and print out each piel in the image...

  • This assignment tests your ability to write C programs that handle keyboard input, formatted console output,...

    This assignment tests your ability to write C programs that handle keyboard input, formatted console output, and input/output with text files. The program also requires that you use ctype functions to deal with the logic. In this program, you will input from the user two characters, which should both be letters where the second letter > the first letter. You will then input a file character-by-character and output those letters that fall between the two characters (inclusively) to an output...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT