## C Program Using Structure to Calculate Marks of 10 Students in Different Subjects

by Dinesh Thakur Category: C Programming (Pratical)

In this program, a structure (student) is created which contains name,subject and marks as its data member. Then, an array of structure of 10 elements is created. Then, data (name, sub and marks) for 10 elements is asked to user and stored in array of structure. Finally, the data entered by user is displayed.

## C Program Enter the Student Marks and Find the Percentage and Grade

by Dinesh Thakur Category: C Programming (Pratical)

In this example, the if-else-if ladder takes decision based on the value of percentage of marks (percentage) calculated and displays the appropriate division. Here, the value of the percentage calculated for inputted data 80 50 75 evaluates to be 68.33. On the basis of this value, the first condition in if-else-if ladder (percentage>=60 & percentage<100) which evaluates to be true so it displays the message First Division and skip the remaining conditions.

## C Program Calculate Sum Multiply,Division Through Function

by Dinesh Thakur Category: C Programming (Pratical)

In this program user asks to find the sum, division, multiply of two numbers with use of function in other words Polymorphism. The function calling procedure will use in this program to find the sum of two numbers. First user asks the numbers which are use to add, divide or multi. Then it declares a function sum, multi, divide (a,b). The next move it call the function sum with formal arguments int x, int y in this procedure the value call from the upper class but add in other class. And in the last the result print on the screen.

## C Program Sum Total of Five Subject and Calculate Average and Percentage

by Dinesh Thakur Category: C Programming (Pratical)

In this program integer type variables are created which contained data of five subjects that are given. Then some variables of floating type data type also created for required data containing decimal values from user.

## C Program to Sort the Record of Student Merit Wise

by Dinesh Thakur Category: C Programming (Pratical)

In this program user ask to sort the record of multiple students merit wise. In this program structure type variable declared and a temp variable for temporary value storing. User need to establish the merit chart for sorting them. For this process user will use loop statement where user will calculate the data of students that are define on variable value. Loop statement will print all the data about student (roll no,score,name etc.). From the structure type variable.

## C Program Find the Greatest Between Four Number

by Dinesh Thakur Category: C Programming (Pratical)

## C Program Calculate Sum of Diagonal Elements of a Matrix

by Dinesh Thakur Category: C Programming (Pratical)

In this program, two variables of array type element declared. Which contains the value of declared variables and Loop statement will also use to be execute the situation. The loop statement will elaborate its functioning until the condition get false. The other function is to be comparing if (m! = n) that will end the functioning of add the Matrix given components must be define all the conditions true. And the result as output also displayed on the screen as well.

## C Program Find Sum of Two number Through Function

by Dinesh Thakur Category: C Programming (Pratical)

This is C Program Find Sum of Two number Through Function. In this program user asks to find the sum of two numbers with use of function in other words Polymorphism. The function calling procedure will use in this program to find the sum of two numbers. First user ask the numbers which are use to add. Then it declares a function sum (a,b). The next move it call the function sum with formal arguments int x, int y and int z=x+y in this procedure the value call from the upper class but add in other class. And in the last the result print on the screen.

## Print a Table with While Loop

by Dinesh Thakur Category: C Programming (Pratical)

This is C Program to Print a Table with While Loop. In this program the User asks to print a table with the use of while loop. While loop checks the condition at least once and after that it goes on. Three variables are declared to containing the value in it for condition falling. User asks to enter the value. Then using of while condition. While (a<=10) then c=b*a. and so on increment operator a++ and printing the result on the screen.

## Write a Program to Count Vowels in a File Using File Handling

by Dinesh Thakur Category: C Programming (Pratical)

In this program integer type variables declare (vowel,Consonent) and pointer of file (FILE *fp1;). And control statements also used if the given situation is not true than the arguments will be insufficient else it will go on. Nested if statements also come in use the next move is to if file pointer is null then source will not open. While condition tells the (ch!EOF) not equal to End of File. If condition used with the OR (!!) operator. This Will checks out the given characters match the condition. Then it’s Vowel else consonant. And in the last move it will be counted as result.

## C Program Write a Program to Check the Number Divisible by 5 or Not

by Dinesh Thakur Category: C Programming (Pratical)

In this program user checks the logic about numeric value that will it be Division able with 5 or not. To check this declares a variable of integer type. And a logic will be used along with the Modulus operator(%).that will be manipulate with the numeric value and control statement (if-else) used if the numeric value is dividable than output will be ok else it will be reverse.

## C Program Sort a List of Strings using Pointers

by Dinesh Thakur Category: C Programming (Pratical)

In this Program pointer concept is been used with the use of variables of pointer type char and integer type which contain the values. Reorder () also used for sorting the the string as required. In the program string is to be entered after that loop statement works. During loop statement the pointer type variable acquires the memory using malloc() function.

## C Program Write a Program to Check the String is Palindrome or Not

by Dinesh Thakur Category: C Programming (Pratical)

In this program, an array type variables with elements (10) created for which contain the data as required for them. These created variables are character (char) type data type. These variables will use to contain the string data that is been used for the checking condition as required for string functions. And in the End the data entered will be displayed on the screen.

## C Program Count the Numbers of Words in a File

by Dinesh Thakur Category: C Programming (Pratical)

In this program user ask to calculate the words in file. User declare the pointer type file variable for value reference. File open function used to open the file for reading the content in file. If condition checks whether the file is null if it is the else condition comes in where while condition checks the logic (ch!=eof). Through else condition the content check to end of file. And then to print the result on display.

## C Program: Fibonacci Series

by Dinesh Thakur Category: C Programming (Pratical)

Let us denote the i th term in the Fibonacci series as Fi , where. i is assumed to take values starting form 0. Thus, the first four terms in the Fibonacci series are denoted as F0, F1, F2. and F3. The first two terms are given as F0=O and F1 = 1.

## C Program Print Student Marklist

by Dinesh Thakur Category: C Programming (Pratical)

In this program user asks to find out the Student grade and marks. User define strut concept in this program and the array type variable for storing the liable value. Here user asking to enter the required fields like roll no, name and marks of student. After declaring all the user using control statement as nested if-else for marking out the status about passing or fail criteria here user insist a condition if(s[k].m1>=35 && s[k].m2>=35 && s[k].m3>=35) then pass else fail. After finding out this one user find out the total obtaining marks of students.

## C Program Copy One String to Another using Pointers

by Dinesh Thakur Category: C Programming (Pratical)

The program implements the Copy string to another string. The inner function “stcpy” takes 2 string pointers as arguments. “copystr” pointer type function declared and pointer type char variable declare. On next move the argument written “I am Dinesh Thakur” in the variable char pointer type and array type string variable. The required function used “cpystr”.

## C Program to Count Digits,White Space,Others

by Dinesh Thakur Category: C Programming (Pratical)

Let us use an array of characters (str) to store the string and variables nletter, ndigit, nspace and nother to count the letters, digits, white spaces and other characters, respectively.

## C Program Write a Program to Print a Pascal Triangle

by Dinesh Thakur Category: C Programming (Pratical)

In this program to Print the Pascal Triangle Two core concepts will be on the trot. The Control statement (if-else), and Loop Statements. There in the program Integer type Variables declare which use to contain the value. Here variable i,j and Num will use in the Loop statement as according the requirement. As required in the program Nested Loop used for fulfilling the condition along within the control Statement.

## C Program Write a Program to add,subtract and multiply two complex number

by Dinesh Thakur Category: C Programming (Pratical)

Page 1 of 9

Dinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.