Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

THIS IS LANGUAGE 'C' NOT C++ The Problem is, even though I use two 'scaf' to input two different character, as you can see in

THIS IS LANGUAGE 'C' NOT C++

The Problem is, even though I use two 'scaf' to input two different character, as you can see in the picture, one of the two 'scanf' that scans character gets skipped; as a result, the code executes --> "floating exception (core dumped)"

But for my homework, I have to input two different characters (just one letter (it could be capital and it could be lower case ) and the task is to play around with ASCII Table with the two input characters; and I have no clue why this is giving me such an error. PLEASE HELP ME~!!

image text in transcribed

But I want the output to be

size of bit ---> Input Letter --> b or B

int main() char a_prefix; char b or B; double byteCalculation; double bitsCalculation; int size b; char unit; int numPrefix; printf(" size of bite >"); scanf("%d",&size b printf("Input Letter (G T M) -> "); scanf ("%c", &a-prefix) ; printf ("b or B ") scanf ("%c", &unit) ; size of bite --> 3 Input Letter (G T M) --> b or B two separate "scan

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_2

Step: 3

blur-text-image_3

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

Database Principles Programming And Performance

Authors: Patrick O'Neil, Elizabeth O'Neil

2nd Edition

1558605800, 978-1558605800

More Books

Students also viewed these Databases questions

Question

=+ (c) Show that $ is countable if and only if L2 is separable.

Answered: 1 week ago

Question

manageremployee relationship deteriorating over time;

Answered: 1 week ago