Sie sind auf Seite 1von 2

MUTHAYAMMAL TECHNICAL CAMPUS, RASIPURAM 637408 MODEL - 1 Date: 10.12.

.12 Subject Name: Fundamentals computing and programming Dept: CSE, MECH Part A 1) 2) 3) 4) 5) (10 x 2 = 20) Marks: 100 Duration: 3 Hrs

What is meant by keyword? List out the keywords in C. Difference between constant and variable. Distinguish between (*m)(5) and *m(5). Differentiate between getchar() and scanf() functions for reading strings. Write the output for the following C program. main() { char s[10]; strcpy(s,abc); printf( %d %d, strlen(s), sizeof(s)); } 6) What is symbolic constant? 7) Write the output for the following C program. main() { int i=5,j; j =++i +++i+++i; printf(%d %d,i,j); } 8) Give the advantages of pointer. 9) List the similarities and difference between structure and union. 10) Write an appropriate function call (function access) for the following function. void display(int a, int b) { c=sqrt(a*a + b*b); printf(c = %i \n, c); } Part-B Answer any FIVE for the following questions. 11) a) Differentiate between operator and operand. Describe the various types of operators supported by C. (12) b) Give the output for the program main() { int i=0,x=0; (4) (5 x 16 = 80)

while(i<20) { if(i%5==0) {
x + = i; printf(%d, x); } i++; } printf(\n x= %d,x); } 12) a) Explain in detail about managing input and output. b) A C program contains the following statements: #include<stdio.h> int i, j, k; Write an appropriate scanf function to enter numerical values for i, j and k, assuming i) The values for i, j and k will be decimal integers. ii) The value for i will be a decimal integer, j an octal integer and k a hexadecimal integer. 13) a) Explain various loop structures available in C. b) Write a C program to calculate area and circumference of circle. 14) a) With relevant examples discuss about pass by value and pass by address. b) Write a C program that performs matrix addition. (12) (4) (12) (4) (12) (4)

15) a) Write a C program for factorial using recursion. b) Describe in detail about two dimensional array with a suitable example.

(6) (10)

16) a) Write a C program to replacing character as lower case in passed string and return it by using pointer. (10) b) Explain the role of C preprocessor and describe the file inclusive directive. 17) a) Write a C program for Pascals triangle. b) Write a C program to perform power of number using union. 18) a) Discuss briefly about handling the string. (6) (8) (8) (10)

b) Write a C program to compute the following function: s-(x2 + x4 +. + x2n)/n. Trace the program for the values x=2 and n=5.912 (6)

Das könnte Ihnen auch gefallen