Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Find the error in each of the following (There may be more than one error): a) For ( x = 100 , x >= 1
Find the error in each of the following (There may be more than one error):
a) For ( x = 100, x >= 1, ++x )
printf( "%d ", x );
b) The following code should input an integer and a character and print them. Assume the
user types as input 100
scanf( "%d", &intVal );
charVal = getchar();
printf( "Integer: %d Character: %c ", intVal, charVal );
c) for ( x = .000001; x == .0001; x += .000001 )
printf( "%.7f ", x );
d) The following code should output the odd integers from 999 to 1:
for ( x = 999; x >= 1; x += 2 )
printf( "%d ", x );
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