How To Exam?

a knowledge trading engine...


Periyar University 2006 B.Sc Mathematics PROGRAMMING IN C - Question Paper

Sunday, 27 January 2013 02:45Web

B.Sc. DEGREE EXAMINATION, APRIL/MAY 2006.
Fourth Semester
Mathematics (CA)
PROGRAMMING IN C
Time : 3 hours Maximum : 75 marks
PART A — (10 x two = 20 marks) ans ALL the ques..
1. Classify the subsequent as valid or invalid identifiers.
(a) stax
(b) name-and-address
(c) return
(d) lrecord

2. How are the variables declared in C?
3. How does = differ from ==?


.UVJ
'!->« -.,,!.,,,
5. What is the purpose of for loop?
6. (a) What is the purpose of scanf function? (b) Compare the above with getchar function.
7. Define two-dimensional array.
8. Define the subsequent functions :

(a) strcat ()
(b) strcmp ().

9. What is meant by calling a function?
10. What is the automatic variable?
PART B — (5 x four = 20 marks)
ans ALL the ques..
11. (a) Summarize the rules that apply to all numeric-type constants.
Or
(b) elaborate unsigned integer constants? elaborate long integer constants? How do these constants differ from ordinary integer constants?
12. (a) discuss the subsequent bitwise operators. Bitwise AND Bitwise OR Bitwise Shift Bitwise Exclusive OR Or (b) AC program contains the subsequent declarations and initial assignments, int i = 8, j = 5; float x = 0.005, y = - 0.01; char c = V, d = 'd'; Determine the value of every of the subsequent
expressions.
(i) (3*i-2*j)%(2*d-c)
(ii) 2 * ((i/5) + (A * (j - 3))%(i + j - 2))
(iii) (i-3*j)%(c + 2*d)/(x-y)
(iv) 5*(i + j)>«C
(v) !(c==99)
(vi) c > d.
13. (a) Write a program to learn a character and identify it as numeric, white space or other characters.
Or (b) (i) What is the purpose of the while
statement?
(ii) Summarize the syntactic rules
associated with while statement.
14. (a) Write a program/to concatenate 2 string
and create a new string.
/ Or
(b) What wu/ be the output of the subsequent
programs
(i) main ()
int arrl[10], arr2[10], i; for (i = 0; i < = 9; i ++)
{
arrl[i]='A' + i;
N' arr2[i] = 'a' + i;
printf ("%d'\ arr2[i] - arrl[i]);
} } (ii) main ()
{
inti,a[5] = {l};
for (i = 0; i < 5; i ++)
printf ("%d%d\n", i, a[i];
}
15. (a) Write a program to call a function which returns the cube of a provided number.
Or
(b) What is a recursive function? List out the merits and demerits of the function.
ans ALL the ques..
16. (a) What is meant by variable? Summarize the
rules for naming variables? How is a user described
variable various from keyword?
Or
(b) (i) Name and define the 4 data kind qualifiers.
(ii) To which data kinds can every qualifier be applied?
17. (a) (i) What is meant by the equality
operator? How these differ from an assignment
operator?
(ii) What is the important of using precedence rules in the C operators?
Or
(b) The straight-line method of computing the yearly depreciation of the value of an item is provided by
Depreciation= Purchase Price - Salvage Value
Years of service
Write a program to determine the salvage value of an item when the purchase price, years of service and the annual depreciation are provided.

18. (a) Write a program to obtain all the prime
numbers ranging from one and 500 and print them.
Or
(b) (i) Distinguish ranging from the break and continue on statement.
(ii) What is the nested for loop?
(iii) What is meant by do-while loop?
19. (a) Write a program to obtain whether the provided
matrix is symmetric matrix or not.
Or (b) Briefly discuss the string handling functions.
20. (a) Write a program to obtain whether a provided year
is leap year or not using function.
Or
(b) Write a program to searching for an element in an array using binary search.





( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Periyar University 2006 B.Sc Mathematics PROGRAMMING IN C - Question Paper