0% found this document useful (0 votes)
7 views2 pages

C Programming 1

The document outlines a series of practical programming experiments in C, designed for students at Rayat-Bahra University. Each experiment includes a specific task, such as printing 'Hello World', performing arithmetic operations, implementing logical operators, and working with patterns and arrays. The tasks aim to enhance programming skills through hands-on coding practice.

Uploaded by

aryanjaswal75
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
0% found this document useful (0 votes)
7 views2 pages

C Programming 1

The document outlines a series of practical programming experiments in C, designed for students at Rayat-Bahra University. Each experiment includes a specific task, such as printing 'Hello World', performing arithmetic operations, implementing logical operators, and working with patterns and arrays. The tasks aim to enhance programming skills through hands-on coding practice.

Uploaded by

aryanjaswal75
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

Practical Questions

C Programming
Aniket Singh
Rayat-Bahra University, Chandigarh

Questions
Experiment 1 Write a program to print "Hello World" on the screen.

Experiment 2 Write a program to add two numbers. The numbers should be provided by the user
as input.

Experiment 3 Write a program to increment and decrement any variable using the unary operator.

Experiment 4 Write a program to find the remainder of any division operation.

Experiment 5 Write a program to implement the logical AND operator.

Experiment 6 Write a program to implement the logical OR operator.

Experiment 7 Write a program to find the largest among three numbers using the ternary operator.

Experiment 8 Write a program to find the largest among four numbers.

Experiment 9 Write a program to calculate the sum of n numbers provided by the user.

Experiment 10 Write a program to calculate the factorial of a given number.

Experiment 11 Write a program to count the number of digits in a given number.

Experiment 12 Write a program to determine whether a given number is prime or not.

Experiment 13 Write a program to implement a rating system using the switch statement.

Experiment 14 Write a program to determine whether a given number is an Armstrong number.

Experiment 15 Write a function to print the following pattern for a given value of n (e.g., n = 5):

1
1 2
1 2 3
1 2 3 4
1 2 3 4 5

1
Experiment 16 Write a function to print a hollow rectangle pattern.

Experiment 17 Write a program to calculate the factorial of a number using recursion.

Experiment 18 Write a program to find a specific element in an array.

Experiment 19 Write a program to add two matrices.

Experiment 20 Write a program to find the length of a string.

Experiment 21 Write a program to print this pattern

* * * * *
* * * * *
* * * * *
* * * * *
* * * * *

Experiment 22 Write a function to print following pattern.

* * * * *
* *
* *
* *
* * * * *

Experiment 23 Write a function to print following pattern.

1
0 1
0 1 0
1 0 1 0
1 0 1 0 1

Experiment 24 Write a program to find whether a given number is palindrome or not.

Experiment 25 Write a program to find the sum of first and last digit of a given number.

Experiment 26 Write a program to find the odd and even number.

Experiment 27 Write down the program to count odd and even numbers in given array.

Experiment 28 Write down the program to calculate area of rectangle.

Experiment 29 Write down the program to convert degree Celsius to Fahrenheit.

Experiment 30 Write down the program to find out perfect number.

You might also like