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
The _________ indicates the number of elements, or values, an array can hold
Stolb23 [73]
The size declarator indicates the number of elements, or values, an array can hold.It is used in a definition of an array.<span>The size declarator must be a constant integer expression with a value greater than zero. </span>A subscript is used to access a specific element in an array. 
8 0
4 years ago
A chip that wakes up the computer system
bezimeni [28]

Explanation:

The wake-up receiver is an ultra-low power chip that continuously looks out for a specific radio signal, called a wake-up signature, that tells it when to wake up the main device

4 0
3 years ago
Lindsey also needs to calcite the commissions earned each month. If the company earns $200,000 or more in a month, the commissio
IrinaK [193]

Answer:

srry dont know

Explanation:

8 0
3 years ago
Which of the following types of tool should be used only on round work, such as rigid or IMC conduit?
Dafna11 [192]
Its C. A pipe wrench 
6 0
3 years ago
Read 2 more answers
If you commit retail theft your drivers license will be ? A. Revoked, B. Suspended, C. Cancelled or D. Restricted
Likurg_2 [28]
B.suspended because revoked only happens when it's a felony or reckless,and not cancellations because it would have to be false information.
3 0
3 years ago
Read 2 more answers
Other questions:
  • A director notices that one of his camera operators is carrying an accessory without packing it properly in a bag to avoid hurti
    10·1 answer
  • • Write a program to find the maximum, minimum, and average score of players. The input to the program is a file containing play
    9·1 answer
  • How to change font size and style and add a table when creating a webpage?
    6·1 answer
  • Egovernment involves the use of strategies and technologies to transform government by improving the delivery of services and en
    7·1 answer
  • What is the name given to the amount that a particular camera’s lens opens?
    12·1 answer
  • You are required to justify the need to implement a three-tier campus network. Which justification below makes sense for a three
    6·1 answer
  • List three ways you can help somone who is being cyber bullied instead of just being a bustander​
    7·2 answers
  • What is the purpose of this parallelogram shape in a flowchart?
    15·1 answer
  • Before you ever buy your first stock or bond, it's important to understand what type of investor you are. This depends on a numb
    12·1 answer
  • Jason is playing a game in which players must maneuver around changing barriers
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!