subject

Suppose that the input stream stdin contains the (invalid) IP address: 298.173.41.142 Assuming that the variables A and B are declared as ints, which of the following code fragments will correctly read the second part of the IP address (173) into the variable B? a. scanf("%d", &A);
char ch = fgetc(stdin);
scanf("%d", &B);

b. scanf("%d %d", &A, &B);

c. scanf("%d.%d", &A, &B);

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:30
1. before plugging in a new device to a computer you should unplug all other devices turn off the computer turn on the computer 2. many of the maintenance tools for a computer can be found in the control panel under administrative tools display personalization
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
Name the range function that would generate the following list of integers values: 0,1,2,3,4,5.
Answers: 1
question
Computers and Technology, 23.06.2019 21:30
Write a fragment of code that reads in strings from standard input, until end-of-file and prints to standard output the largest value. you may assume there is at least one value. (cascading/streaming logic, basic string processing)
Answers: 3
question
Computers and Technology, 24.06.2019 04:30
Fall protection, confined space entry procedures, controlled noise levels, and protection from chemical hazards are some of the things that contribute to a safe what
Answers: 1
You know the right answer?
Suppose that the input stream stdin contains the (invalid) IP address: 298.173.41.142 Assuming that...
Questions
question
Mathematics, 26.06.2019 23:30
question
Mathematics, 26.06.2019 23:30
question
Mathematics, 26.06.2019 23:30
question
Mathematics, 26.06.2019 23:30