You are on page 1of 9
‘snit7ia4, 243 PM Mid Term niroduction to © Programming - © Mid Term - Introduction to C Programming - C chaitanyakrishna_n@srmap.edu.in Switch account ® draft saved The name, email, and photo associated with your Google account will be recorded when you upload files and submit this form * Required Name * chaitanyakrishna Email * chaitanyakrishna_n@srmap.edu.in Registration Number * AP21110010182 hitpsdoce, google. comifermslda/FAIpQLSIZ2LVXKUbyEMWOR|FAPWJoMsuedlsgxiV3Cndg2IBF Opgiviewtorm ‘snit7ia4, 243 PM Mid Term niroduction to © Programming - © computer is the most powerful computer. * O 4) Mainframe © super O aMini © >») Micro 2. RAM is not a non-volatile memory * @ a Tne © »)False 3. Which of the following statements are correct? I. Keywords are those words whose meaning is already defined by Compiler. II. Keywords cannot be used as variable names. Ill. There are 32 keywords in C. IV. C keywords are also called as reserved words. * O alana O »)land i O obtandiv © 4) Allof the above hitpsdoce, google. comifermslda/FAIpQLSIZ2LVXKUbyEMWOR|FAPWJoMsuedlsgxiV3Cndg2IBF Opgiviewtorm 29 ‘snit7ia4, 243 PM Mid Term niroduction to © Programming - © 4. An Identifier ~ © )Isaname of a thing such as variable and function © }) Is made up of letters, numerals and the underscore © ©) Can contain both uppercase and lowercase letters O 4d)Allof the above 5. Inasimple the ‘if’ is false? * 4) The program searches for the last else in the program b) Nothing c) Control falls through to the statement following ‘if’ Oo00°0 4d) The body of the statement is executed hitpsdoce, google. comifermslda/FAIpQLSIZ2LVXKUbyEMWOR|FAPWJoMsuedlsgxiV3Cndg2IBF Opgiviewtorm statement with no ‘else’, what happens if the condition following 39 ‘snit7ia4, 243 PM Mid Term niroduction to © Programming - © 6. Please refer to the program below. On termination j will have the value * Consider the following program segment. int i=6720; int j=4; while((izgi)==0) { eu pa + b)8 9 4) 6720 OO0°0 hitpsdoce, google. comifermslda/FAIpQLSIZ2LVXKUbyEMWOR|FAPWJoMsuedlsgxiV3Cndg2IBF Opgiviewtorm 49 ‘snit7ia4, 243 PM Mid Term niroduction to © Programming - © 7.Refer to the program below . What is the output of the following program segment. * What is the output of the following program segment? ints; if{2<1) else x= (2b) if(b>c) a=1; else if(c>d) b=2; ») if (a+b) if(b>c) a=1; else if(e<=d) b=2; c) if (ab); else if (b>c) a=1; else if (c<=d) b=2; d) if (a>b) ; else if (b>o) a=1; else if (c>d); else b=2; Oo Oo Oo oO Oo 9. Which of the following array is defined in the statements? double accounts [50] [20] [80]; Only (b) (c) and (a) a © accounts is a three-dimensional, 75,000 element integer array hitpsdocs. google. comiformslda/FAIpQLSIZ2LVXKUbyEMMOR|FAPWioMsuedlsgxWVSCndg2IBF Opgiviewform ae snit7i24, 243 PM Mid Teer nrodution to © Programming - C © )accounts is a three-dimensional, 85,000 element floating-point array © accounts is a three-dimensional, 65,000 element string constants © A accounts is a three-dimensional, 80,000 element double-precision array 10. What is the output of the following program fragment- ing i=107, x=5; tf e>7)? "Sed": "%c"i); a) An execution error b) A syntax error ©) Printing of k Oo000 ) None of the above Section 2- Descriptive Questions-Attempt any 3- Each question carry 5 M, 3* 5 = 15 M. Please upload you answer sheet as one file with the file upload option given in the last question. QI. Write a program A. To find sum of series X/2 + X3/4 + X5/6 + X7/8.... N (where value of X and N to be input) B. Factorial of a given number N fa Your answer hitpsdocs. google. comiformslda/FAIpQLSIZ2LVXKUbyEMMOR|FAPWioMsuedlsgxWVSCndg2IBF Opgiviewform 119 snit7i24, 243 PM Mid Term niroduction to © Programming - © 2. Write a program A. Generate the first n terms of Fibonacci sequence. B. Generate all the prime numbers between 1 and n, where nis a value supplied by the user Your answer Q3.What is variable? Write any 5 rules of variable? Explain with an example? Your answer 4. Explain the following with example A. Type casting B. Nested if C. Break and continue Your answer 5. What is an array? Explain the following with examples A. Two dimensional array 8, Character array C. Difference between char and string explain any 4 functions of string 2, Add file JER Never submit pa through Google Forms. hitpsdoce. google. comifermslda/FAIpQLSIZ2LVXKUbYEMWGR|FAPWJoNsuedlsgxiV3CndgZIBF Opgiviewtorm ae ‘snit7ia4, 243 PM Mid Term Inroduction to © Programming - © Google Forms hitpsdoce, google. comifermslda/FAIpQLSIZ2LVXKUbyEMWOR|FAPWJoMsuedlsgxiV3Cndg2IBF Opgiviewtorm

You might also like