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
Which type of operating system is usually used in personal computers?
castortr0y [4]
Windows 10 thru 7 home and some people use mac osx
7 0
3 years ago
Read 2 more answers
sara has just started using the Internet. She would like to be more efficient . In 3-4, give sara some advice about how to be mo
natta225 [31]

Hello,

Well my advice for Sara when using the web would be 3 things.

1: Never tell anyone where you live,Your name, Or any other personal information.

This is important as it will keep you safe and others that are in your family.

2: Get anti virus hardware on your devise.

This will help to stop bad people, and bugs/glitches,this will also protect you from information thieves.

3: Make sure to keep your passwords saved on paper.

I know a lot of people use, google(ect.) to save there passwords to make everything easy, but a good way to never loss them is to wright them down.

Have a great day!



7 0
3 years ago
Which of the following function declarations correctly expect an array as the first argument?
NARA [144]

Answer:

Only

Option: void f1(float array[], int size);

is valid.

Explanation:

To pass an array as argument in a function, the syntax should be as follows:

functionName (type arrayName[ ] )

We can't place the size of the array inside the array bracket (arrayName[100]) as this will give a syntax error. The empty bracket [] is required to tell the program that the value that passed as the argument is an array and differentiate it from other type of value.

3 0
3 years ago
Focusing on a target market makes it harder to develop products and services that specific groups of customers want.
Sloan [31]

Answer:

ikr so true

Explanation:

5 0
3 years ago
Printed versions of your presentation that contain the slides and blank lines below are called speakers notes
Vadim26 [7]

No, printed versions of your presentation that contain the slides and blank lines below are not called speakers notes.

Speakers notes are notes that are hidden within a PowerPoint presentation and allowing the speaker to refer back to them during the presentation.

6 0
3 years ago
Read 2 more answers
Other questions:
  • The protocol that enables computers on the Internet to communicate with each other is called _____.
    7·1 answer
  • What is a social media networks
    5·1 answer
  • 6. Why did he choose to install the window not totally plumb?
    13·1 answer
  • The number of pixels that can be displayed on the screen at one time is known as what? screen resolution. viewing angle. color d
    5·1 answer
  • What is a traffic controller?what are its functions?
    13·1 answer
  • What are candid shots? what are posed shots?
    13·1 answer
  • Which should be addressed by stakeholders when reviewing the problem statement? Select all that apply. All possible outcomes hav
    12·1 answer
  • A student registers for a course in a university. Courses may have limited enrollment i.e a student must
    5·1 answer
  • Cine stie repede va rog mult si repede
    9·1 answer
  • Public class Billing {
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!