Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C PROGRAMMING This project is a series of 12 pointer related. All the code is included in the starter code for this project. Your task

C PROGRAMMING

This project is a series of 12 pointer related. All the code is included in the starter code for this project. Your task is to correct the code in the 12 pointerTest functions.

Uncomment all the code in each function and them one at a time....don't try to fix them all at once!

You should not make any changes to main.c

//[1] void pointerTest1() { //char *c; //float x = 10; //c = &x; //printf("%d", *c); } //[2] void pointerTest2() { //float x = 10.25; //float* f; ////f = x; //printf("%g", *f); } //[3] void pointerTest3() { //char sa[] = "How are you?"; //char t; //char* f; //f = &sa; //printf("%s", f); } //[4] void pointerTest4() { //int* t; //int x; //t = &x; //x = 11; //*t++; //printf("%d", *t); } //[5] void pointerTest5() { //int t[] = { 1,2,3,4,5 }; //int* p; //int* q; //int* r; //p = t; //q = p[1]; //r = p[2]; //printf("%d %d %d", *p, *q, *r); } //[6] // In the assignment statement *pz is required. void pointerTest6() { //int x = 5; //int y = 8; //int z; //int* px; //int* py; //int* pz; //px = &x; //py = &y; //pz = &z; //pz = *px + *py; //printf("%d", z); } //[7] void pointerTest7() { //double x = 5; //double *px = &x; //double* py; //printf("%d", px); } //[8] void pointerTest8() { //int x; //int* px; //*px = 5; //px = &x; //printf("%d", x); } //[9] void pointerTest9() { //int a; //int *p; //int* q; //a = 2; //p = &a; //q = p; //printf("%d %d", p, q); } //[10] void pointerTest10() { //int y[] = { 1,2,3 }; //int* p; //p = &y[1]; //printf("%d %d", (1 + y), *p); } //[11] void pointerTest11() { //unsigned int y[] = { 65555,65550,65543 }; //printf("%u", y[2]); } //[12] void pointerTest12() { //int p[] = { 1,2,3,4 }; //char* c; //c = p; //printf("%d", *c); } 

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

Step: 3

blur-text-image

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

Structured Search For Big Data From Keywords To Key-objects

Authors: Mikhail Gilula

1st Edition

012804652X, 9780128046524

More Books

Students also viewed these Databases questions

Question

6-22. New budget figures

Answered: 1 week ago