Question: A copy of your source code as .cpp, .c, or .txt file and also a screen shot of the running results of your program as.

A copy of your source code as .cpp, .c, or .txt file and also a screen shot of the running results of your program as. jng, .jpg, or .pdf file are required for 2.1, 2.2(a), and 2.2(b), respectively. Submit all the required files by one batch to Blackboard's Lab Assignments before the deadline. Don't zip your files. 2.1 (2 marks) Create a C program to print the number of memory bytes required to store the following types of variables, int char long double float long double Data Type # of Memory Bytes Hint: Use the sizeof(type) operator. 2.2 (2 marks) (a). Create a C program to calculate the output voltage Vo of a RLC circuit according to the following formulas for different inputs of frequency, PI = 3.14 Vi = 5 volts L = 4.3e-4 Henrys C = 5.1e-6 Farads R-5 Ohms XL = 2* PI*f*L Xc = 1/(2* PI*f*C) Vo=(Vi * R)/ sqrt( (X_ -Xc) * (X_ -Xc) +R*R) Where X = Inductive reactance in ohms. f= Frequency in hertz. Xc = Capacitive reactance in ohms. Hint: include the math.h header file because the sqrt() function is needed. (b). Change the above program to input different values of R and output the frequency f where Vo is maximum. Use frequencies from 10 to 1,000,000 Hertz with an increment of 10
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
