Escolar Documentos
Profissional Documentos
Cultura Documentos
___________________
Code: AC05/AT05
OCTOBER 2012
Time: 3 Hours
%d" ,i ,j);
return 0;
}
(A) 7 21
(C) 7 24
(B) 8
(D) 8
21
24
(B) Auto
(D) Aeroplane Train
1
Code: AC05/AT05
(B) 5
(D) 7
(A) O(n)
(C) O(n log n)
(B) constant
(D) All of these are C keywords
(B) 3
(D) 2
(B) # ifndef
(D) # endif
2
Code: AC05/AT05
j. What is the value assigned to address by the following statements, when input
is NEW YORK?
char address [10];
scanf(%s, address);
(A) NEW YORK
(C) NEW
(B) NEWYORK
(D) YORK
(10)
(6)
a. Write any four format codes that are used in scanf statement. Write a scanf
statement to read age(int) , sex(char), grade (float), and name (string).
(4)
b. Give the syntax of for statement and describe the control flow in that
statement. Write a for statement to print the multiplication table of 2, 3 and
4.
(6)
c. Write a program to find the largest element and its position in an array.
Q.5
(6)
(4)
c. Explain with example, the syntax and usage of the following in C program.
(i) Nested Structure Definition
(ii) Array of structures
(6)
Code: AC05/AT05
Q.6
(4)
b. Write a function to copy a string to another, without using library function. (6)
c. Explain with an example program the following operations on a file-open,
read and close.
(6)
Q.7
a. Write a C program that accept name and marks scored by students in five
subjects. Use functions
(i) ADD to add records with student names and marks to a file
(ii) CALCULATE to read the records from the file, calculate the result and
display.
(10)
b. Write a C function to insert an element into a sorted linked list. Assume
each node has an integer value and a pointer to the next element.
(6)
Q.8
(6)
b. What are the guidelines for construction of statements and guidelines for
input/ output formats during coding?
(6)
c. Write an algorithm to reverse the digits of an integer.
Q.9
(4)
(4)
(4)