Trending ▼   ResFinder  

PUNJAB TECHNICAL UNIVERSITY MCA - I (SEM 1) MAY 2008 : Programming In C

3 pages, 26 questions, 0 questions with responses, 0 total responses,    0    0
mca_india
  
+Fave Message
 Home > mca_india >

Formatting page ...

Roll No. ...................... Total No. of Questions : 13] [Total No. of Pages : 03 Paper ID [A0502] (Please fill this Paper ID in OMR Sheet) MCA (102) (S05) (O) (Sem. - 1st ) PROGRAMMING IN C Time : 03 Hours Maximum Marks : 75 Instruction to Candidates: 1) 2) Section - A is Compulsory. Attempt any Nine questions from Section - B. Section - A (15 2 = 30) Q1) a) Given the following code fragment, what will be the value of num[3][5]? num[1][3] = 6; num [1][4] = 7; num[1][5] = 4; num[3][5] = (num [1][3] + num[1][5]) * num [1][4]; num[3][5] = (num [1][3] + num[3][5]) * num [1][4]; b) What is wrong with the statements: scanf ( % d , i); and putchar ( /n );? c) Evaluate the expression (i 2* (j + k) d) Are the variable names argc and argv reserved and can only be used with the main ( ) function? e) Write the correct conditional expression for the following code fragment: i) for i = 10, j = 2, and k = 3. max = z; if ! (x + y > z) max = x + y; f) Are the statements *value[2]; and (*value ++)++; equivalent? g) What is wrong with the following code fragment? D-616 P.T.O. char code [] = This is a secret message... ; main ( ) { int checksum = 0; while ( *code ) { checksum + = *code; ++code; } } h) What is the difference between MyStruct[2].value and MyStruct value[4]? i) Explain the definition: (*what_ is _this ( ))( ). j) Give your comment on the statement: Code that subscripts a pointer outside the defined boundaries of the array may compile, but logically be in error. k) What does fopen ( ) function return if there is a no problem opening the file? l) When do we use fseek( ) function? m) What is the difference between line feed and carriage return? n) Give an example that uses sizeof operator. o) Which is better amongst the binary search or linear search, and why? Section - B (9 5 = 45) Q2) Write an algorithm to swap the value of two integers. How is it different from the corresponding program? Q3) List & explain any five rules for forming variable names. D-616 2 Q4) Amit sells bunches of flowers at a flower shop. One day Amit s boss tells him that at any time during the day he (Amit s boss) will need to know: (a) What is the average value of bunches sold. (b) What was the value of the least expensive bunch sold. Draw a flow chart to determine the same. Q5) Write a program that accepts a number from 1 through 7, prints the corresponding day of the week in words using case. Q6) Write a program to flip the 2nd bit of the 32 bit number. Q7) Write a program using pointers to accept first name, middle name & last name of a student display its initials? For example Ravi Kumar Jain should be printed as Jain R.K. Q8) What is the self-referential structure? Can a union be self-referenced? Q9) What is the difference between constant pointer and pointer to a constant. Give examples. Q10)Write the program for displaying the most frequent word in a file. Q11)What is dynamic memory allocation? Explain by an example. Q12)Write a C program to print the program itself. Q13)Write a program implementing selection sort. zzzz D-616 3

Formatting page ...

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 

Additional Info : Mca - I (sem 1) May 2008 Question Paper - Programming In C
Tags : mca exam papers, mca question papers, ignou mca question papers, ptu mca question papers, mca sample question paper, mca mumbai university question papers, mca exam syllabus, mca exam question paper, online mca exam papers, online mca exam preparation, mumbai university mca question papers, ignou university mca question papers  


© 2010 - 2025 ResPaper. Terms of ServiceContact Us Advertise with us

 

mca_india chat