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
A(an)_______is built-in preset calculation. <br>formula <br> function <br>equation <br>AutoSum​
Yanka [14]

Answer:

Hello! The answer to your question is function I had the same question and got it right!

Explanation:

Hope this helped:)

3 0
3 years ago
The Subset Sum problem is a generalization of the Knapsack problem. Group of answer choices True False g
Katarina [22]

Answer: True

Explanation:

Subset sum problem and Knapsack problem can be solved using dynamic programming.

In case of Knapsack problem there is a set of weights associative with objects and a set of profits associated with each object and a total capacity of knapsack let say C. With the help of dynamic programming we try to include object's weight such that total profit is maximized without fragmenting any weight of objects and without exceeding the capacity of knapsack, it is also called as 0/1 knapsack problem.

Similar to knapsack problem, in subset sum problem there is set of items and a set of weights associated with the items and a capacity let say C, task is to choose the subset of items such that total sum of weights associated with items of subset is maximized without exceeding the total capacity.

On the basis of above statements we can say that subset sum problem is generalization of knapsack problem.

4 0
3 years ago
Internet Security: How can you work securely on the internet? What actions should be avoided and what are the pitfalls?
Cerrena [4.2K]

Answer:First of all, to work safely at the internet you should avoid any not secure page, and if you can’t do that, avoid entering stuff such as credit cards or passwords on this sites. Now, to work safely it’s recomendable to have a VPN(virtual private network), that hides your IP direction.

Explanation:

8 0
3 years ago
The words, the computer is the future, has how many bits?
Nadusha1986 [10]

The words, the computer is the future, has 64 bits.Modern computer has

two types of processors which include:

  • 32 bit
  • 64 bit
<h3>Bits</h3>

This is referred to as the smallest unit of data which is used in a computer.

The 32 bit computer are the old types which have a smaller processor and is

relatively slow.

The 64 bit computer on the other hand are the modern types with large

processors and are relatively fast.

Read more about Computer here brainly.com/question/13380788

4 0
2 years ago
Images of movies are common types of software true or false
topjm [15]

Answer:

True

Explanation:

3 0
3 years ago
Other questions:
  • What is the output of the following Python program? try: fin = open('answer.txt') fin.write('Yes') except: print('No') print('Ma
    9·1 answer
  • Anyone want to join my dîšćòrd
    8·2 answers
  • Write a definition of the function printDottedLine, which has no parameters and doesn't return anything. The function prints to
    14·1 answer
  • The author of ""Cyber-psychopathy: What Goes On in a Hacker’s Head"" states that a crucial component of computer hacking lies in
    6·1 answer
  • A palindrome is a word or phrase that reads the same both backward and forward. The word ""racecar"" is an example. Create an al
    15·1 answer
  • There are local administrators for each of the departments, excluding the IT. These local administrators will use the local admi
    7·1 answer
  • How do operating system work?
    5·1 answer
  • Rosa is building a website for a multimedia company. She wants to add a drop-down menu functionality to the website's main page.
    12·1 answer
  • Which statement about intellectual property is true? (CSI-7.6) Group of answer choices It is okay to use code you find on the in
    14·1 answer
  • . What process skill would a scientist use to find the length of a line
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!