Skip to main content

Posts

C Structures

  C Structures 1)make a structure for employee    name    email    occupation Ask the user to enter these details for 3 employees then ask the user whose details he wants to display (1 or 2 or 3) depending on his choice display that employee details.

C pointers

  C pointers theory C pointers practice 1)Adding two numbers using pointer 2)multiplying 3 numbers using pointers 3)Program to Swap Elements Using Call by Reference(using pointer) 4)Access the elements of array using pointer and display the largest number      

C Functions

  User Defined Function User defined Function return practice 1)C Program to Display Prime Numbers Between Intervals Using Function 2)C Program to Check Prime or Armstrong Number Using User-defined Function 3)C Program to Find the Sum of Natural Numbers using Recursion      

C Arrays

  Array 2D Array practice 1)c program to find the sum of numbers in an array 2)C Program to Calculate Average Using Arrays 3)C Program to Add Two Matrix Using Multi-dimensional Arrays 4)C Program to Find Largest Element of an Array 5)C Program to Sort the Array in an Ascending Order 6)program to reverse a string    

C Control Statements

for Loop while loop do...while loop practice 1)print Fibonacci  series 2)check whether given number is palindrome 3)c program to reverse a number

C Conditional

  if else Statement if else if Statement Practice 1)C Program to Check Whether a Character is Vowel or Consonant 2)C Program to Check Leap Year 3)C Program to Check Whether a Character is an Alphabet or not switch Statement Practice 1)C Program to Create Calculator

C Programming Basics

  Keywords Keywords are predefined, reserved words used in programming that have special meanings. ex:- int money; Here, int is a keyword that indicates money is a variable of type int (integer). Identifiers Identifier refers to name given to entities such as variables, functions, structures etc. Variables In programming, a variable is a container (storage area) to hold data. ex:- int playerScore = 95; Here, playerScore is a variable of int type Constants If you want to define a variable whose value cannot be changed, you can use the const keyword. ex:- const double PI = 3.14; Data Types Data types are declarations for variables.This determines the type and size of data associated with variables. Input Output (I/O) use scanf() function to take input from the user, and printf() function to display output to the user #include <stdio.h> int main() { int a; float b; printf("Enter integer and then a float: "); // Taking multiple inputs scanf("%d%f", &a, &b)...