Question: Hi, Can someone please help me fix these error messages? I need it to compile properly in UNIX. Please help. I'm completely lost! My code
Hi,
Can someone please help me fix these error messages? I need it to compile properly in UNIX. Please help. I'm completely lost!
My code is below:
#include
void print(int, char, char, float);
int main(int argc, char* argv[])
{
int num1, num2 = 13;
char c = 'H';
float score1 = 12.5;
char ca[3] = "Hi";
printf("The value of num1 is: %d and num2 is: %d ", num1, num2);
printf("Address of num 1 is: %p, %p ", num1, num2);
printf("The value of c is: %c ", char);
printf("Address of c is: %p ", char);
printf("The value of score1 is: %f" , float);
printf("Address of score1 is: %p ", float);
printf("The values of ca are: %ca, %ca, %ca ", ca, &(ca[1], &(ca[2]);
printf("Addresses of ca are: %p, %p, %p ", ca, &(ca[1]), &(ca[2]));
printf("The value of argc is: %d and argv is: %s ", argc, argv[0]);
printf("Addresses of argc is: %p and argv is %p, argc, argv[0]);
dummy(num2, c, ca, score1);
/* pause here */
printf("The value of num1 is: %d and num2 is: %d ", num1, num2);
printf("Address of num 1 is: %p, %p ", num1, num2);
printf("The value of c is: %c ", char);
printf("Address of c is: %p ", char);
printf("The value of score1 is: %f" , float);
printf("Address of score1 is: %p ", float);
printf("The values of ca are: %ca, %ca, %ca ", ca, &(ca[1], &(ca[2]);
printf("Addresses of ca are: %p, %p, %p ", ca, &(ca[1]), &(ca[2]));
printf("The value of argc is: %d and argv is: %s ", argc, argv[0]);
printf("Addresses of argc is: %p and argv is %p, argc, argv[0]);
return 0;
}
void dummy(int x, char y, char * z, float w)
{
x++;
y++;
w = w + 2.3;
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
