Question: DEFINITION Just modify the code in Part C in the following manner: 1. int array[8] should be replaced by the char array[] = EENG112 Introduction

 DEFINITION Just modify the code in Part C in the following

manner: 1. int array[8] should be replaced by the char array[] =

DEFINITION Just modify the code in Part C in the following manner: 1. int array[8] should be replaced by the char array[] = EENG112 Introduction to Programming" 2. modify call_by_reference array so that its input is char* and it modifies its input as follows: a. Each vowel is replaced by a character 1, b. Each consonant is replaced by a character O. 3. print_ID_array should be modified to print character sequence. Keep the original form of code in Part C, just make required modifications. To explore the usage pointers Objective: Syntax: float* b; double* C; char* d; long* e; int* a; example: int* a; int aa; a = &aa; *a = 1; Experiment: In this experiment, you will understand the concept and the use of pointers. Prob. 1: The program creates three integer type variables, and three pointers to integer type variables, and shows their values to the screen, than by using pointers we modify original values and show again them to the screen, and also it shows the address of created integer variables. #include void main(void) { int a,b,c; int *aa, *bb, *cc; aa = &a; bb = &b; CC = &C; a = 5; b = 6; C = 7; printf("Before modification "); printf("a = %d, b = %d, c = %d ", a,b,c); //modify values of a, b and c using pointers aa, bb, and cc respectively *aa += 3; *bb += 3; *CC += 3; printf ("After modification "); printf("a = $d, b = %d, c = %d ", a,b,c); /ow lets print address of a, b and c printf ("Address of a, b and c "); printf("&a = $p , &b = $p , &c = $p ", aa, bb, cc); 1 Prob. 2: Now lets use functions to modify original values of a, b, and c by using pass by value and pass by reference technique, and see the difference #include void pass_by_value (int, int, int); void pass_by_reference (int* ,int* , int *); int main(void) { int a,b,c; int *aa, *bb, *CC

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!