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
mars1129 [50]
3 years ago
11

Write, compile, and test a program named PersonalInfo that displays a person’s name, birthdate, work phone number, and cell phon

e number on separate lines. Follow the format in the example below
Computers and Technology
1 answer:
djverab [1.8K]3 years ago
7 0

Answer:

A very simple C program is as follows:

#include <stdio.h>  // for input output functions

int main()  

 {

    printf("Name : John\n");   //display name

    printf("Date of Birth : 05/02/1993\n");  //displays DOB

    printf("Mobile Number: 98-7654321\n");  //displays mobile number

  }    

Explanation:

Now if you want to take name, date of birth and number from user as input then you can use the following code:

#include <iostream> // for input output functions

using namespace std; // to identify objects like cin cout

/* The function named PersonalInfo that takes input from user and displays name, mobile number and data of birth on output screen */

void PersonalInfo(char name[],char birthdate[], char number[]){

//prompts user to enter name

cout<<"Please enter your name: "<<endl;

cin>>name; //stores name entered by the user

//prompts user to enter his dob in the format given in the bracket

cout<<"Please enter your birthdate (dd/mm/yyyy): "<<endl;

cin>>birthdate; //stores dob entered by the user

//prompts user to enter his mobile number in the given format

cout<<"Please enter your mobile number (xx-xxx-xxxxxxx): "<<endl;

cin>>number; //holds the digits entered by the user

cout<<"Your name is: "<<name<<endl; //displays name

cout<<"Your birthdate is:"<< birthdate<<endl; //displays date of birth

cout<<"Your mobile number is: "<<number<<endl; } //displays number

int main() //start of main() function body

{   char username[30],dob[30],phone[30];

/*three char type arrays that contain name of user in username, date of birth in dob and phone number in phone array */

   PersonalInfo(username,dob,phone);  } //calls function PersonalInfo()

Output:

Please enter your name: John

Please enter your birthdate (dd/mm/yyyy): 09/05/1993

Please enter your mobile number (xx-xxx-xxxxxxx): 91-123-4567890

Your name is: John

Your birthdate is: 09/05/1993

Your mobile number is: 91-123-4567890

You might be interested in
If we are using an 4-character password that contains only lowercase English alphabetic characters (26 different characters), ho
Trava [24]

Answer:

11,424,400 possible passwords

Explanation:

Since all characters are letters and only lowercase

we have 26∧4 = 456,976 possibilities

For a 5-character password which is still lower case sensitive.

we have 26∧5 = 11,881,376 possibilities

Many more possible passwords = (11881376-456976)

= 11,424,400 possible passwords

6 0
3 years ago
Read 2 more answers
Write a MATLAB code for the following problem:
AysviL [449]
<span>Here is matlab that should work % cos(x) = 1 - (x^2)/2! + (x^4)/4! -(x^6)/6!+(x^8)/8!... % let y= x*x % cos(x) = sum( (-y)^n/(2n)! ) format short x= 0.3*pi; y= x*x; for N= 1:6 n= 0:N; s1= [(-y).^n./factorial(2*n) ] mac= sum(s1); cx= cos(x); str= sprintf('%d terms. series: %12.10f cos(x): %12.10f\n %12.10f',... N, mac,cx, (cx-mac)); disp(str); end;</span>
7 0
3 years ago
Which of the following is an HTTP response status type?
andrey2020 [161]

Answer: All of the above

Explanation:

200 OK, 301 permanently moved and 400 bad request all are the Hyper text transfer protocol (HTTP) response status type. The HTTP response status types basically indicated the complete request in the HTTP.

All these given types are the responses and request that are involved in the HTTP status type.

200 OK is one of the request which basically depends upon the HTTP status type success.

301 permanently moved is the response in the URL which are used for permanently change the resources of request.

And 400 bad request is not properly understand by server due to the invalid syntax in the HTTP.

6 0
4 years ago
Which step in the penetration testing life cycle is accomplished using rootkits or trojan horse programs? maintain access gain a
jenyasd209 [6]

The step in the penetration testing life cycle is accomplished using rootkits or trojan horse programs is option a: maintain access.

<h3>What is maintaining access in penetration testing?</h3>

“Maintaining Access” is a stage of the  penetration testing life cycle and it is said to have a real purpose.

It is one that tends to allow the pentester to stay in the set systems until he get the information he need that is  valuable and then manages to take it successfully from the system.

Hence, The step in the penetration testing life cycle is accomplished using rootkits or trojan horse programs is option a: maintain access.

Learn more about penetration testing  from

brainly.com/question/26555003

#SPJ1

7 0
2 years ago
Write a function called simulate_several_key_strikes. It should take one argument: an integer specifying the number of key strik
Furkat [3]

Answer:

The solution code is written in Python 3

  1. import random
  2. import string
  3. def simulate_several_key_strikes(l):
  4.    char_set = string.ascii_lowercase
  5.    return ''.join(random.choice(char_set) for i in range(l))
  6. print (simulate_several_key_strikes(10))

Explanation:

The program is aimed to generate random characters and the number of characters generated is dependent on user input. Hence, we will need to import the random module (Line 1). We also import string module so that we can make use of its associated method to generate English letters (Line 2)

Next, we create the function simulate_several_key_strikes that takes one single parameter, l, as input. Within the function body, we use ascii_lowercase method to generate the lowercase letter set and assign it to char_set variable (Line 5). We use random.choice method to randomly pick one of the letter in char_set and join it with an empty string (Line 6). Please note there is a for-loop that will repeatedly generate l-number of character and eventually return it as output.

We test the function by passing 10 as input parameter and we shall get a sample output as follows:

xuiczuskoj

7 0
3 years ago
Other questions:
  • Write the pseudocode for linear search, which scans through the sequence, looking for ν. Using a loop invariant, prove that your
    14·1 answer
  • A(n) __________ can include a computer's full operating system, applications, and system settings, including security and config
    7·1 answer
  • Which of the following statements about light-emitting diodes is correct
    11·1 answer
  • Which network protocol is used to route IP addresses?<br>A. TCP<br>B. UDP<br>C. IP<br>D. ICMP
    15·1 answer
  • Se Statements
    6·1 answer
  • X = 19 y = 5 print (x % y)
    11·1 answer
  • The third generation of computers was marked by the introduction of ____.
    8·1 answer
  • What happens when in Word 2016 when the home ribbon tab is clicked on?
    13·1 answer
  • Cine stie repede va rog mult si repede
    9·1 answer
  • How to install specific version of create-react-app so.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!