Question
The following code consists of 5 parts. Find the errors for each part and fix them. Explain the errors using comments on top of each
The following code consists of 5 parts. Find the errors for each part and fix them. Explain the errors using comments on top of each part.
*/
#include
////////////////////////////////////////////////////////////////////////// ////////////// Part A. (5 points) //////////////////
int *number; printf( "%d ", *number );
////////////////////////////////////////////////////////////////////////// ////////////// Part B. (5 points) //////////////////
float *realPtr; long *integerPtr; integerPtr = realPtr;
////////////////////////////////////////////////////////////////////////// ////////////// Part C. (5 points) //////////////////
int * x, y; x = y;
////////////////////////////////////////////////////////////////////////// ////////////// Part D. (5 points) //////////////////
char s[] = "this is a character array"; int count; for ( ; *s != '\0'; ++s) printf( "%c ", *s );
////////////////////////////////////////////////////////////////////////// ////////////// Part E. (5 points) //////////////////
float x = 19.34; float xPtr = &x; printf( "%f ", xPtr );
return 0; }
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