You are on page 1of 3
a Total No, of Printed Pages:03 SUBJECT CODE NO:-N-4013 FACULTY OF SCIENCE & TECHNOLOGY B.Sc. (Computer Science) F-¥. (Sem-I1) Examination March/April 2019 (C Programming - 1 CS 204-T [Time: 1:30 Hours] Please check whether you have got the right question paper. NB 1) All questions are compulsory. 2) Draw diagram whenever necessary 3) Use only blue and black pen QI Multiple choice Questions 1) What is the output of the following program ineludestdio.b> void footint*);, int main() { int 10; Sosa void foo(int*p) 5 { pintindare} 4 10, Garbage value e Compile ine enor 2). What is the output of folowing program? ‘ tinelude void fantint x) t x= 30; b. 20 © Compile time error N-4013 83639509784 4DEOHSE28946SF480672 N-4013 [Mtax.Mtarks: 50) 0 Code crash 4. Garbage value 219 3) To define / declare a structure __ key wordis used a. Stritueb. Siuct—e. sruct—d._unon 7 3 44) When fopend is notable to open afl, it returns a EOF b. NULL. Runtimeror d+ Compiler Dependent 5) feck) should be prefered over rewind ( mainly Because rewind) doesn’t work for empty files : rewind( may fil fr larg files in rewind, there is no way o check ifthe operation completed succesfully all ofthe above 6) the sizeof an structure variable is equal to zero bytes b. Size ofthe largest member types ©. sumofsize ofa member ype none of hese 7) we can access _memberis of an union a time a. single B. two all “none 8) An external variabl throughout the program. a Alive b. Active & Bothativeand active d, None of above 9) in compiler directives, #ifde stand for a. if ob. iPdefine ©. elseif None of above Lo) #if..jendi used as 1% Macro substitution directive Compiler control directive | © Simple branching statement. Allofabove Q2 a) Whatis the purpose of retum statement? Explain with example 0s 8) Whats reeusion? What advantages ie therein is we? 05, R ) Write a program in C to swap values of two variables using a pointer. 10 a3 8) Write a program in C to define a structure name stStud having member nD, sName, 05 Course, cDiv. Declare a variable oftype’sstStud and populate the same. ) Write a program in C, to find whether the inputted number is prime or nt, using a os recursive functions. oR 8), Write a program in C to open a binary file in append mode and edit it, close the file. 10 Reopen the file and read the inputted data, N03 . 2019 5836395097 44DEDHAEDS46SFASD672

You might also like