Your First C Lab
Dive into C programming with this beginner-friendly lab. Learn to write, compile, and run your first C programs, covering basics like output, variables, and string manipulation.
C
Use of Gets Function in C Programming
In C Programming language, gets() function is used to take input from the user. Unlike scanf(), gets() reads a whole line of text, stops reading when Enter key is pressed, and does not discard the newline character.
C
Creating While Loop Programs in C
In this lab, we will learn how to create a while loop program in C language. A while loop is used in programming to execute a block of code repeatedly until the specified condition becomes false. This loop is used when we don't know beforehand how many times the loop will run.
C
Swapping Numbers with Pointers
In C programming, you can swap two numbers using pointers. Pointers are powerful features in C that allow us to manipulate data by storing and accessing addresses instead of actual values. In this lab, we will learn how to swap two numbers using pointers.
C
Calculate Simple Interest Program
In this lab, you will learn how to write a C program to calculate the Simple Interest for a given principal amount, rate of interest, and time duration.
C
Prime or Composite Number Using Recursion
In this lab, we will learn how to write a C program that checks if a number is a prime number or a composite number using recursion. A prime number is a number that is only divisible by 1 and itself, while a composite number is a number that is not a prime number. We will use recursion to write the program, which is a technique to solve problems by breaking them down into smaller, simpler problems.
C
Reverse a String Using Pointer
Pointers provide direct access to memory, and by using pointers, we can access and manipulate the values and addresses of variables and arrays in memory. The program we will build in this lab will use pointer variables to reverse a given string.
C
Recursive Power Calculation in C
In this lab, we will learn how to calculate the result of a given number raised to the power of n using recursion in C programming.
C
Reverse a String Program
In this lab, you will learn how to write a C program to reverse a given string. The program will take input from the user, reverse the string and output the result to the console. This concept can be used to check if a string is a palindrome, because a palindrome string will have the same value even after we reverse it.
C
Sum of Digits Using Recursion
Recursion is a programming technique where a function calls itself, allowing the function to repeat until a base case is met and the function returns the final output. In this lab, we will learn how to find the sum of digits of a given number using recursion.
C
Sort Array Elements
This lab will guide you through a step-by-step process for sorting array elements in ascending order.
C
Reversing Case of Character
This lab will guide you through the process of writing a C program to reverse the case of input character. This program will take a user input character and convert it to its opposite case (lowercase to uppercase or uppercase to lowercase).
C
Sum of N Integers Using Arrays
In this lab, you will learn how to create a program to find the sum of n integers using an array. You will use C programming language to create the program.
C
Program to Find Size of Any File
In this lab, we will learn how to find the size of any file in C programming language. We will use fseek() and ftell() functions to find the size of the file.
C
Sum of First N Numbers with Recursion
In this lab, we will learn how to use recursion to find the sum of the first N numbers. We will use the C programming language to write a program that takes an user input, calculates the sum of the first N numbers, and outputs the result to the user. Recursion is a technique used in programming where a function calls itself to solve a problem.
C
Program to List Files in Directory
In this lab, we will create a C program to list all the files present in a directory using the dirent.h header file.
C
Sum of Digits Calculation
In this lab, we will learn to write a program to calculate the sum of digits of a given number in C programming language.
C
Reverse Content of File Using C
In this lab, we will learn how to reverse the content of a file using C programming language.
C