Important question for Internal 1
Part A
1.
What will be the output of the following
program, when the value of i is 5 and 10
void main()
{
int
i;
scanf(“%d”,&i);
if(i==5)
printf(“FIVE”);
}
2.
Differentiate while and do while with simple
example.
3.
Write a code segment using while to print numbers
from 10 down to 1.
4.
How does the break statement provide a better
control of loops.
5.
Write the c program for the following
expressions
i)
A=5<=9 && 6!=5
ii)
A=b++ + ++b where b=50
6.
Write the following condition using “ ? : “
operators,
Salary = 4x+100 If x<=40
Salary = 300 if x==40
Salary = 4.5x +150 if x>40
7.
What is the value of b[0] in the following
program.
void main()
{
int a[5]={1,4,6,9,3}
int *b;
b=&a[2];
}
8.
Differentiate between Library and User defined
Functions.
9.
What is the need for user defined functions?
10.
Is main is a keyword in C language? Justify.
11.
What is self referential structure?
12.
struct
{
char name[20];
int
num;
} student;
What is the size of the structure and union
for the above program? Justify it.
13.
What is the need for file?
14.
List the formatted and unformatted file
functions.
15.
Define getw() and putw() functions.
16
How will you find the End of a file?
17.What is
the use of ftell()?
18. Can we place the file pointer in the required
position? Justify your answer.
19. What are the advantages of unions over
structure?
20.Which is required the header file for the file
manipulation?
21. What
do you understand by strings? How do you declare a string?
22. What is a Macro? Why do we use macros in
C programs?
PART B
1.
A) Write a C program to find Fibonacci series
using Recursion. (8)
B) What is 2 dimensional array how to declare
and initialize an 2d array in C. illustrate with an example
2. A) What is
mean by Preprocessor explain any 2 preprocessor directives with examples.
B) Write a
C program that read a character and display only the vowels using switch case.
3. a) Discuss
about pointers and its use in C. (8)
b) Write a
C program to reverse a given number. (8)
4. a) Explain
about structure declaration in C with suitable example.
b) Maintain
employee records for a company using array of structures.
5. a) Describe
various file handling functions with example.
b) Write a
program to copy the content of source file into destination.
6. a) Explain
the File operations in Binary Modes.(8)
b)
Manipulate the student details using Binary Files.(8).
7. a)Explain all loop statements in C
Language with example.(8)
b) Explain in
detail about Union with an example. (8)
8. Write
a C-program to exchange two given values using function
module (a) call by value (8) (b) call by reference.(8)
9. Write
A Program to input marks in 5 subjects, calculate the %age and display the
division as per the following rules-
a. Percentage >=60 – First
b. %age >=50 –Second
c. %age >=40 – Third
d.
%age <40 -- Fail.
(16)
10. Explain
briefly about different types of Array. (8)
No comments:
Post a Comment