Answer:
Since the question expect us to declare a C-string, the solution code is written in C as follows:
- char ssn[9];
- 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.
Answer:
Websphere Studio Application Developer
is where the term ‘App’ comes from. It is any piece of software that allows us to actually ‘use’ the computer. For example, it may be a word processor, web browser, spreadsheet software or even just a game. Application software relates to the user rather than the hardware
Answer:
<em>C++.</em>
#include <iostream>
using namespace std;
////////////////////////////////////////////////////////////////
int main() {
int weekly_hours = 0;
int hourly_rate;
float gross_pay = 0;
cout<<"Enter weekly hours worked: ";
cin>>weekly_hours;
cout<<"Enter hourly rate: ";
cin>>hourly_rate;
cout<<endl;
////////////////////////////////////////////////
if (weekly_hours > 40) {
gross_pay = (weekly_hours*hourly_rate) + ((weekly_hours*hourly_rate)*0.5);
}
else
gross_pay = weekly_hours*hourly_rate;
cout<<"Weekly gross pay: $"<<gross_pay;
////////////////////////////////////////////////
return 0;
}