Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hi, #include<stdio.h> void print(int, char, char, float); int main(int argc, cha

ID: 3743981 • Letter: H

Question

Hi,

#include<stdio.h>

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;

}

Explanation / Answer

#include void dummy(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 ", c); printf("Address of c is: %p ", &c); printf("The value of score1 is: %f ", score1); printf("Address of score1 is: %p ", &score1); 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 ", c); printf("Address of c is: %p ", &c); printf("The value of score1 is: %f ", score1); printf("Address of score1 is: %p ", &score1); 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; }
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote