Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 1: 1) Write a C program getPhoneNumber.c that accepts a phone number from the user in the form XXX-XXX-XXXX, and then displays it in

image text in transcribed

Part 1: 1) Write a C program getPhoneNumber.c that accepts a phone number from the user in the form XXX-XXX-XXXX, and then displays it in the form (XXX)XXX-XXXX: Enter a date (XXX-XXX-XXXX): 011-123-4567 You entered (011) 123-4567 Question: Execute your getPhoneNumber.c and attach a screenshot of the output. Then write the source code of getPhoneNumber.c in your answer sheet and upload your file getPhoneNumber.c to iCollege. 2) Suppose that we call scanf as follows: scanf(ngf%d% f " , &x, &i, &y); Question: If the user enters 12.1 5.65789 What will be the values of i, x and y after the call? (Assume that x and y are float variables andi is an int variable.) And explain why? Put your answer in the answer sheet. 3) Suppose that we call scanf as follows: scanf("%d%f%d", &i, &x, &j); Ouestion: If the user enters 10.2 86 What will be the values of i, x and j after the call? (Assume that i and j are int variables and x is a float variable.) And explain why? Put your answer in the answer sheet

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Experts Guide To Database 2

Authors: Bruce L. Larson

1st Edition

0070232679, 978-0070232679

More Books

Students also viewed these Databases questions

Question

Question What is a secular trust?

Answered: 1 week ago