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
postnew [5]
3 years ago
5

A U.S. social security number consists of a string of 9 digits, such as "444422333". Declare a char array named ssn suitable for

storing a social security number as a C-string, and write a statement that reads in the next 9 characters of standard input into this array. (Assume that the input consists of one big sequence of digits without spaces or newlines.)
Computers and Technology
1 answer:
tatuchka [14]3 years ago
8 0

Answer:

Since the question expect us to declare a C-string, the solution code is written in C as follows:

  1.    char ssn[9];
  2.    scanf("%s",ssn);

Explanation:

A C-String is a string written in C language. It is an array of characters. To declare a C-string, we use the keyword, <em>char </em>and then followed with the variable name + brackets and the number of characters in the string. For example, we can create a C-String for the SSN number as in Line 1.

To read standard input into the array, we can use C built-in function, <em>scanf(). </em>Just include a string placeholder, %s, and the variable<em> ssn </em>as arguments to <em>scanf()</em>. This will assign the string input by user to variable <em>ssn</em> as C-String.

You might be interested in
Numeric data is stored in what for direct processing
Ede4ka [16]
A string variables??? I'm not sure does this have any multiple choice 
3 0
3 years ago
What is going to be the shortest, most concise restatement of information?
iVinArrow [24]
Not sure i need this too
4 0
3 years ago
Read 2 more answers
Which of the following commands would I use to begin a new presentation?
ki77a [65]

Answer:

begin >new

Explanation:

just trust me ok hehe

7 0
3 years ago
MULTI SELECTION
GaryK [48]

Answer:

A. Click on the Print icon at the top of the screen

Explanation:

8 0
3 years ago
You want to use your Windows workstation to browse the websites on the internet. You use a broadband DSL connection to access th
xxTIMURxx [149]

Answer:

IP

Explanation:

8 0
3 years ago
Other questions:
  • Instructions:Select the correct answer.
    13·1 answer
  • Write a Java program to print the result in the series 10, 15, 20, 25, ..., 50. Hint: You can use an iteration statement for wri
    9·1 answer
  • Which aperture setting will give the shallowest depth of field?
    10·2 answers
  • What is the 7 X 7 when referring to PowerPoint presentations?
    12·2 answers
  • an object or device outside the computer, that one would plug into a port to control the functions of a computer are?
    9·2 answers
  • Match each task with the features necessary to complete the task
    10·1 answer
  • Please answer <br><br> Steps 1-6 <br><br> Visual basics
    7·1 answer
  • I need le help, darn ijourneys
    10·2 answers
  • I CANT DO SKIN MODS ON BRAWLHALLA RIGHT!!!! IM SO MADDDDDDDDDDD
    11·1 answer
  • When a company sends you recommendations of what to buy you know that :
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!