100% found this document useful (1 vote)
427 views2 pages

C - Hackathon

Uploaded by

S D Venkatesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
427 views2 pages

C - Hackathon

Uploaded by

S D Venkatesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

C - HACKATHON

Marks: 50
SECTION - A

Write C programs for the following questions. 40M

1. Write a C program to find the largest number among three numbers.

Input : 10,12,9
Expected Output : 12

2. Write a C program to swap the values of two variables.

Input : var1 = 10, var2 =20


Expected Output : val1 = 20, val2 = 10

3. Write a C program to check whether the given year is Leap year or not.

Input : 1624
Expected Output : Leap Year

Input : 2000
Expected Output : Leap Year

4. Write a C program to find the grade of a student for the given marks.
● Marks >= 90: Grade A
● Marks >= 75 and < 90: Grade B
● Marks >= 50 and < 75: Grade C
● Marks < 50: Grade D
SECTION - B

Answer the following questions. 10M

1. Which function used to take input from the user in C ?


2. What is the size of int data type in C ?
3. What is the default return type of main function in C ?
4. Which symbol is used for unary plus ?
5. Which data type is used to store the decimal numbers in C ?
6. Which data type is used to store the single character in C ?
7. Can we use a single ‘if’ statement in C ?
8. Can we use a single ‘else’ statement in C ?
9. List out the unary operators in C ?
10. List out the bitwise operators in C ?

You might also like