Vous êtes sur la page 1sur 2

b%=3+4;

a*=a+5;
printf( "b = %d a = %d", b , a ) ;
Unit Examination }
Department of CSE/ IT
Branch: CSE, IT, EEE and E&I Date &Time: 23/3/16 2. #include<stdio.h>
Semester: VI Max. Marks: 50 void main()
Subject: Technical Training- C Programming {
Staff In-charge: A.Sivarama Krishnan/IT, P.Vasantha Kumari/IT int i = 3 , j ;
j = ++i * ++i * ++i ;
Part A (5 * 2 = 10 marks) printf ("%d",j);
Answer All the Questions }
1. What is the difference between the = symbol and OR
== symbol? b. (i) Swap two variables without using third variable.
2. What are header files and what are its uses in C (6)
programming(any 4)? (ii) How can we find out prime numbers from 1 to
3. Can I use int data type to store the value 32768? 50? (10)
Why?
4. Write a loop statement that will show the following 7. a. (i) Write a program to find the length of the string
output: without using built-in function.
1 (8)
12 (ii) Write a program to display pascal triangle.
123 (8)
1234 OR
12345 b. (i) Write a c program to find out Fibonacci series of a
5. Write a simple code fragment that will check if a given number using function recursion.
number is positive or negative. (8)
(ii) Write a program to show that its output becomes
Part B (40 marks) 3,6,11,20,37,......1034?
Answer All the Questions (8)
6. a. (i) How to print 1 to 100 without using any 8. What is the output of the program?
conditional loop? (8)
(8) (i) #include<stdio.h>
(ii) What is the output of the program? void main()
(8) {
1. #include<stdio.h> int q = 2, d = 3, st;
void main() st = q*d/4-12/12+ 12/3*16/d;
{ printf ("st = %d", st);
int a = 3, b = 4 ; }
(ii) #include<stdio.h>
void main()
{
printf ("bytes occupied by 7 = %d", sizeof
( 7 ) ) ;
printf ("bytes occupied by 7 =%d", sizeof ( 7 ) )
;
printf ("bytes occupied by 7.0 = %d", sizeof
(7.0));
}

Faculty In-charge HOD

Vous aimerez peut-être aussi