Answered step by step
Verified Expert Solution
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
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started