[SOLVED] CSC3320 Lab Assignment 9 - Post-Lab

24.99 $

Category: Tags: , , , ,
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Lab-09-a5rubi.zip (275.1 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
πŸ”’ Securely Powered by:
Secure Checkout
5/5 - (2 votes)

Purpose: Learn how to use array in C. Understand the basic memory address in C.
Part 1:
Write a C program named as getMostFreqChar.c that finds the most frequent letter from the input via ignoring the case sensitive and prints out its frequency. For example, sample outputs could be like below

Part 2:
When a variable is stored in memory, it is associated with an address. To obtain the address of a variable, the & operator can be used. For example, &a gets the memory address of variable a. Let’s try some examples.
Write a C program addressOfScalar.c by inserting the code below in the main function.
Questions:
1) Run the C program, attach a screenshot of the output in the answersheet.
2) Attach the source code in the answer sheet
2) Then explain why the address after intvar is incremented by 4 bytes instead of 1 byte.

Part 3:
Write a C program addressOfArray.c by inserting the code below in the main function.

Questions:
1) Run the C program, attach a screenshot of the output in the answer sheet.
2) Check the address of the array and the address of the first element in the array.Are they the same?
3) Write down the statement to print out the length of the array by using sizeofoperator.
Submission:
ο‚• Upload an electronic copy (pdf) of your answer sheet to the folder named β€œLab 9” in Google Classroom
ο‚• Please add the lab assignment number and your name at the top of your answer sheet.
ο‚• Upload the C files getMostFreqChar.c, addressOfArray.c and addressOfScalar.c to the folder named named β€œLab 9” in Google Classroom
ο‚• Name your file in the format of Lab9_ FirstnameLastname (e.g Lab9_FilRondel.pdf)

  • Lab-09-a5rubi.zip