Question: a ) Identify the errors from the following program #include Int main ( ) { Int a , b; Int div; Scanf ( % f

a) Identify the errors from the following program #include Int main(){ Int a, b; Int div; Scanf(%f%f, &a, b); Div=a/b; Printf(%d, Div); Return 0; }[2] b) Check whether the following variables are valid or invalid. If it is invalid, mention the reason. Sum val, Sum_val, $Sumval, Sum9val, 9Sumval, sum val [2] c) Find the values of the following variables int a=39/2; int b=39.0/2; float c=39.0/2; float d=39/2; int e=39%4; float f=(float)(4%39); [2]2 a) Find output when input values of b are 4,5,10 and 12, respectively scanf(%d, &b); printf(Start
); if (b<=5) printf(Hello
); else if(b>5) printf(World
); else if ((b>=2)&&(b<10)) printf(UIU
); else if ((b>2)||(b<=10)) printf(CSE
); else printf(Error
); printf(Stop); [3] b) Write the following program using the Switch Case statement in Programming Language C #include int main(){ int choice; if((choice=1)||(choice==2)) printf(CSE
); else if ( choice==3) printf(UIU
); else if (choice>3) printf(Bye); return 0; }[3]3 a) Draw a flowchart to find the sum of the following series. Also show the sum value on monitor. 2+4+6+.......+100[3] b) Write a program to calculate the online average of 4 positive floating point numbers taken from keyboard as inputs. Follow the sample input and output given below for understanding the logic. [3] United International University (UIU) Dept. of Computer Science & Engineering (CSE) Page 2 of 2 Sample Input Processing Output on Monitor num=10.010.0/1=10.0 Average=10.0 num=-5.0-- num=20.0(10.0+20.0)/2=15.0 Average=15.0 num=-18.6-- num=15.6(10.0+20.0+15.6)/3=15.2 Average=15.2 num=15.2(10.0+20.0+15.6+15.2)/4=15.2 Average=15.24 a) Show manual tracing for the following code segment for(i=3; i>=1; i--){ for (j=1; j<=i; j++){ printf(%d,2*j+1); } printf(
); }[3] b) Write a program to perform the following operations i) Declare an integer array of size 500 ii) Read n integer numbers from keyboard and store them in the array, where n is input integer from keyboard iii) Find the sum of the numbers that are stored in odd number indices in the array iv) Also show all the integer numbers of the array on monitor [3]5 a) Show manual tracing for the following code segment char str1[7]={\0}; char str2[7]={0}; strcpy(str1,CSE); strcpy(str2,UIU); strcat(str2, str1); strrev(str2); puts(str2); printf(
); puts(str1); int i=strlen(str2); printf(
The length of %s is=%d, str2, i); [3] b) Write a program to determine the maximum among the numbers that are stored in i-th row of the two dimensional array A[n][n], where i

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!