Question: 1) Write a C program to swap 2 randomly generated numbers by using call by reference. Note: please read relevant reference for learning how to

1) Write a C program to swap 2 randomly generated numbers by using call by reference.

Note: please read relevant reference for learning how to randomly generate a number with a seed set up.

2) Write a program in C to store 10 elements in a char array and print the elements using a pointer. The requirements are given as follows,

  • define a char array with the letters a~j

  • define a pointer and use it for accessing each element in the char array, and print them all out

3)Write a program in C to count the number of vowels in a string using a pointer.

  • ask the user to enter a string with a length less than 20

  • define a pointer to get access to the above string, go through the whole string and count the number of vowels in it

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!