Menu
×
Tutorials Ms Word Tutorial Ms Excel Tutorial Ms PowerPoint Tutorial C Language Tutorial C++ Tutorial C Sharp Tutorial Visual Basic Tutorial HTML Tutorial CSS Tutorial JavaScript Tutorial WordPress Tutorial
     ❯   

ADVERTISEMENT

  • All
  • Blogs
  • C Examples
  • C Tutorial
  • C++
  • Computer Science
  • CSS
  • HTML
  • Ms Excel
  • Ms Office
  • Ms Word
  • Notes
  • Programming
  • Web Development
  • XIth Class

C Examples

Sum of N Numbers

This code takes a user-defined number ‘n’, calculates the sum of all natural numbers from 0 to ‘n’, and then prints the result.

Find Largest of Three Numbers

This code takes three numbers as input and finds and displays the largest number among them. It demonstrates the use of conditional statements in C for decision-making based on user input.

Print Magic Numbers Till N

Certainly! Let’s break down the code into a detailed explanation: This line includes the necessary header file stdio.h for input/output operations. These lines declare two functions: The program execution begins from the main function. Variables are declared to store loop counter (i), user input (num), and intermediate results (sumOfDigits, reverseOfNumber). The user is prompted to …

Print Magic Numbers Till N Read More »

N Strong Numbers

Certainly! Let’s go into more detail about each part of the code: Certainly! Let’s go into more detail about each part of the code: These lines include the necessary header files. stdio.h is included for input and output operations, and math.h is included for mathematical functions. Although the math.h file is included, it is not …

N Strong Numbers Read More »

Check Perfect Number or Not

Checks whether the sum of divisors (sum) is equal to the original number (num). If they are equal, it prints a message indicating that the number is perfect; otherwise, it indicates that the number is not perfect.

Number Is Armstrong or not

This program extracts the digits of a given number, calculates the sum of the cubes of these digits, and checks if this sum is equal to the original number. If it is equal, the number is considered an Armstrong number; otherwise, it’s not.

Generate Table of Given Number

This program takes user input for a number and the range for the multiplication table, validates the input, and then prints the multiplication table within the specified range if the input is valid. If the input is not valid, it provides an error message.

Calculate Gross Salary

This code calculates and displays various components of an employee’s salary, including dearness allowance, house rent allowance, and provident fund deduction. It then calculates the gross salary based on these components and the user-provided basic pay.

Calculate Bonus On Salary

This code determines the bonus and updated salary for an individual based on their gender and initial salary. It demonstrates the use of conditional statements in C for making decisions based on user input.

Multiplication By Addition

This code performs integer multiplication using repeated addition and subtraction. It handles both positive and negative values of ‘a’ and ‘b, ensuring that the result is accurate.

Given Year Is Leap Year Or Not

This C program checks whether a given year is a leap year or not. A leap year is a year that is evenly divisible by 4, except for years that are divisible by 100 but not by 400.

Scroll to Top
Scroll to Top