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
Technology has changed the way functions are performed in the law office. Which function has been the least affected by technolo
Ipatiy [6.2K]
Are there options? If there are not I'd say the servers becase they basically still do the same thing they did back then except they have higher standards for squrity!
7 0
3 years ago
. What may happen if a large number of computer users are attempting to access a Web site at the same
MatroZZZ [7]
B. you may be unable to link to the site.
If the site uses cookies, then there might be a site overload. 
6 0
3 years ago
Read 2 more answers
Below is a 4-bit down-counter. What is the largest number of the counter if the initial state Q3Q2Q1Q0=0011? (D3 and Q3 are MSB,
icang [17]

Answer:

The correct answer is option (A) 1111

Explanation:

For initial state Q3Q2Q1Q0=0011,

For load = 1 and count = 1 the count is as follows;

1100

1101

1110

1111

Therefore, the maximum count value is 1111

3 0
3 years ago
Less than 40 percent of teens have used marijuana within the past year. True or false?
fgiga [73]
That is true. I hope this helps
6 0
2 years ago
The PRNG variable ___________ is defined in NIST SP 800-90 as a number associated with the amount of work required to break a cr
Kamila [148]

Answer:

Strength

Explanation:

A huge number of systems use a process called Pseudo Random Number Generation (PRNG). In NIST SP 800-90, The PRNG has a set of parameters that define various variables within the algorithm. The PRNG variable strength is defined in NIST SP 800-90 as a number associated with the amount of work required to break a cryptographic algorithm or system.

3 0
3 years ago
Other questions:
  • A Color class has three int color component instance variables: red, green, and blue. Write a toString method for this class. It
    13·1 answer
  • Identify the four basic categories of hardware in a microcomputer system. system unit, modem, ram, and microprocessor system uni
    5·1 answer
  • Which of the following is true regarding the mod operator, %? Group of answer choices It can only be performed on int values and
    8·2 answers
  • C++
    11·2 answers
  • In the code segment below, assume that the int variable n has been properly declared and initialized. The code segment is intend
    5·1 answer
  • cpp g Write a for loop to print all elements in courseGrades, following each element with a space (including the last). Print fo
    15·1 answer
  • Citing Wikipedia as a reference is not considered a good practice because 1.leverages a neutral point of view. 2.hosts unopinion
    8·1 answer
  • If a triathlon is a sport combining three events, what do you think would be the word for a sport combining five events?
    7·1 answer
  • Write a SELECT statement that returns three columns: VendorName from Vendors table, DefaultAccount No from Vendors table, Accoun
    10·2 answers
  • Identify the correct characteristics of Python tuples. Check all that apply.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!