Skip to content

C Programming Assignment Questions

C Programming Assignment Questions
Computer Science Paper-1
__________________________________________________________________
Note:  Solve any 10 questions of the followings.
           Compiled code with no errors should be submitted in CD.
           Each program attempted should be written on assignment sheet with
           output.
           Assignment is to be submitted on the day of practical exam.
           Remember student has to submit CD + Assignment file on practical exam
           day.
__________________________________________________________________

1)    C Program to illustrate Arithmetic operators. This program takes an integer variable i and performs the
        basic arithmetic functions like Addition, subtraction, Multiplication, Division, Unary Addition and
        Unary Subtraction.
2)    Write a C program to display the “Hello FYCS Students” on the screen.
3)    Write a C program to find the square root of the number entered by user.
4)    Write a C program to display the length of the string entered by the user.(eg: ‘Test’ , length = 4)
5)    Write a C program to print the array element in ascending order (Take 5 numbers from the user).
6)    Write a C program to copy a string from one variable to another. (Eg. Copy ‘hi’ into str1 variable).
7)    Write a C program to print the numbers from 1 to 25 using for loop(put 5 numbers of gap)
        Eg. 1 5    10 15 20 25
8)    Write a C program to calculate simple interest of the amount. (Take the value of p,n,r from the user).
9)    Write a C program to calculate area of the circle (area = pi * r*r) .Take value of radius from the user. 
        Use pi = 3.14
10)    Write a C program to demonstrate the putc (), getc (), putchar ()    functions.
11)    Write a C program to print the array element in descending order
         (Take 4 numbers from the user).Apply Bubble sort algorithm.
12)    Write a C program to concatenate the two strings and display the output on the screen.
13)    Write a C program to display the number in descending order from 60 to 30 using while loop
         (put 6 number of gaps among the number) e g: 60    54 48……
14)    Write a C program to find the factorial of the number entered by user. (eg: 5!=120)
15)    Write a C program to swap the value of two numbers using temp variable.
         (Eg before swapping: A=20, B=30 after swapping: A=30, B= 20)
16)    Write a C program to check whether the number is odd or even.
17)    Write a C program to check whether the year is leap year or not.(hint: use modulus % operator)
18)    Write a C program to take a value from the user and find out whether the number is divisible by 5 or
          not.
19)    Write a C program to sort the 10 numbers in ascending order using Bubble Sort algorithm.
20)    Write a C program to find out ASCII value of the character entered by the user.
21)    Write a C program to take marks of the student and accordingly display the Grade of the student.
          Eg: Marks > = 90 then Grade = ‘A’
               Marks > = 70 and Marks < 90 then Grade = ‘B’
               Marks > = 40 and Marks < 70 then Grade = ‘C’
               Else Grade = ‘D’

Leave a Reply

Your email address will not be published. Required fields are marked *

error: Content is protected !!