Skip to content

Commit 60d2868

Browse files
committed
refactor
1 parent eb5b8d4 commit 60d2868

File tree

190 files changed

+2027
-2027
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

190 files changed

+2027
-2027
lines changed

01_basic_input_output/01_print_c_programming.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to print C Programming on screen
1+
// // C program to print C Programming on screen
22

33
// // Header files
44
#include <stdio.h>

01_basic_input_output/03_print_in_double_quotes.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to print "C Programming" in Double Quotes
1+
// // C program to print "C Programming" in Double Quotes
22

33
// // Header files
44
#include <stdio.h>

01_basic_input_output/04_print_in_single_quotes.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to print "C Programming" in Single Quotes
1+
// // C program to print "C Programming" in Single Quotes
22

33
// // Header files
44
#include <stdio.h>

01_basic_input_output/05_use_of_escape_chars.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to print following String :-
1+
// // C program to print following String :-
22
// // 👉 Output => " Hello, this is forward slash (/) , this is back slash (\) , this is single quote (') and this is double quotes (") "
33

44
// // Header files

01_basic_input_output/06_print_forward_slash.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to print single Forward Slash (/) on screen
1+
// // C program to print single Forward Slash (/) on screen
22
// // 👉 Output => /
33

44
// // Header files

01_basic_input_output/07_print_back_slash.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to print single Back Slash (\) on screen
1+
// // C program to print single Back Slash (\) on screen
22
// // 👉 Output => \
33
44
// // Header files

01_basic_input_output/08_print_double_slashes.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to print single Back Slash (\) on screen
1+
// // C program to print single Back Slash (\) on screen
22
// // 👉 Output => \\
33
44
// // Header files

01_basic_input_output/09_print_new_line_char.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to print New line character '\n' on screen.
1+
// // C program to print New line character '\n' on screen.
22
// // 👉 Output => \n
33

44
// // Header files

01_basic_input_output/10_print_tab_char.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to print Tab character '\t' on screen.
1+
// // C program to print Tab character '\t' on screen.
22
// // 👉 Output => \t
33

44
// // Header files

01_basic_input_output/11_print_percent_symbol.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to print Percent symbol (%) on screen
1+
// // C program to print Percent symbol (%) on screen
22
// // 👉 Output => %
33

44
// // Header files

01_basic_input_output/12_print_percent_d.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to print (%d) on screen
1+
// // C program to print (%d) on screen
22
// // 👉 Output => %d
33

44
// // Header files

01_basic_input_output/13_add_two_numbers.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to take two numbers as input and print sum of the numbers in following format :-
1+
// // C program to take two numbers as input and print sum of the numbers in following format :-
22
// // 👉 Output => Sum of N and N => N
33

44
// // Header files

01_basic_input_output/14_area_of_circle.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to take radius of circle and print area of circle in following format :-
1+
// // C program to take radius of circle and print area of circle in following format :-
22
// // 👉 Output => Area of Circle is A having radius R
33
// // Where A is Area of Circle and R is Radius of Circle.
44

01_basic_input_output/15_return_value_of_printf.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to print return value of printf() function
1+
// // C program to print return value of printf() function
22

33
// // Header files
44
#include <stdio.h>

01_basic_input_output/16_count_chars_using_printf.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to count number of characters in this string => “C Programming” using printf() function.
1+
// // C program to count number of characters in this string => “C Programming” using printf() function.
22

33

44
// // Header files

01_basic_input_output/17_return_value_of_scanf.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to print return value of scanf() function
1+
// // C program to print return value of scanf() function
22

33
// // Header files
44
#include <stdio.h>

01_basic_input_output/18_take_date_and_print.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to take date as an input in below given format and convert print it in other format :-
1+
// // C program to take date as an input in below given format and convert print it in other format :-
22
// // 👉 Input format => DD-MM-YYYY. Example => (18-10-2023)
33
// // 👉 Output format => Day is DD, Month is MM and Year is YYYY. Example => (Date is 18, Month is 10 and Year is 2023)
44

01_basic_input_output/19_take_time_and_print.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to take time as an input in below given format and convert print it in other format :-
1+
// // C program to take time as an input in below given format and convert print it in other format :-
22
// // 👉 Input format => HH:MM:SS. Example => (06:22:45)
33
// // 👉 Output format => HH Hour, MM Minute and SS Second. Example => (06 Hour 22 Minute and 45 Second)
44

01_basic_input_output/20_print_octal_form.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to take input a number in Decimal form and print its Octal form
1+
// // C program to take input a number in Decimal form and print its Octal form
22

33
// // Header files
44
#include <stdio.h>

01_basic_input_output/21_print_hexadecimal_form.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to take input a number in Decimal form and print its Hexadecimal form
1+
// // C program to take input a number in Decimal form and print its Hexadecimal form
22

33
// // Header files
44
#include <stdio.h>

01_basic_input_output/22_input_octal_num.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to take input a number in Octal form and print its Decimal form
1+
// // C program to take input a number in Octal form and print its Decimal form
22

33
// // Header files
44
#include <stdio.h>

01_basic_input_output/23_input_hexadecimal_num.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to take input a number in Hexadecimal form and print its Decimal form
1+
// // C program to take input a number in Hexadecimal form and print its Decimal form
22

33
// // Header files
44
#include <stdio.h>

01_basic_input_output/24_take_only_two-digits.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to take input an integer number and now take only first two digits of that number which user enters and omit rest of the digits
1+
// // C program to take input an integer number and now take only first two digits of that number which user enters and omit rest of the digits
22

33
// // Header files
44
#include <stdio.h>

01_basic_input_output/25_print_only_two_digits_after_point.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to take a floating point number and print only two digits after the decimal point.
1+
// // C program to take a floating point number and print only two digits after the decimal point.
22

33
// // Header files
44
#include <stdio.h>

02_operators/01_cel_to_fah.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to convert Celcius to Fahrenheit.
1+
// // C program to convert Celcius to Fahrenheit.
22

33
// // Header Files
44
#include <stdio.h>

02_operators/02_fah_to_cel.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to convert Fahrenheit to Celcius.
1+
// // C program to convert Fahrenheit to Celcius.
22

33
// // Header Files
44
#include <stdio.h>

02_operators/03_ft_to_mtr.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to convert Feets to Meters
1+
// // C program to convert Feets to Meters
22

33
// // Header Files
44
#include <stdio.h>

02_operators/04_mtr_to_ft.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to convert Meters to Feets
1+
// // C program to convert Meters to Feets
22

33
// // Header Files
44
#include <stdio.h>

02_operators/05_mile_to_km.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to convert Miles to Kilometers
1+
// // C program to convert Miles to Kilometers
22

33
// // Header Files
44
#include <stdio.h>

02_operators/06_km_to_mile.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to convert Kilometers to Miles
1+
// // C program to convert Kilometers to Miles
22

33
// // Header Files
44
#include <stdio.h>

02_operators/07_in_to_cm.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to convert Inches to Centimeters
1+
// // C program to convert Inches to Centimeters
22

33
// // Header Files
44
#include <stdio.h>

02_operators/08_mm_to_in.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to convert Millimeters to Inches
1+
// // C program to convert Millimeters to Inches
22

33
// // Header Files
44
#include <stdio.h>

02_operators/09_sizeof.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to demonstrate the use of sizeof() operator
1+
// // C program to demonstrate the use of sizeof() operator
22

33
// // Header Files
44
#include <stdio.h>

02_operators/10_area_perimeter.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to find Area and Perimeter of a Rectangle
1+
// // C program to find Area and Perimeter of a Rectangle
22

33
// // Header Files
44
#include <stdio.h>

02_operators/12_add_complex.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to add two Complex Numbers
1+
// // C program to add two Complex Numbers
22

33
// // Header Files
44
#include <stdio.h>

02_operators/13_simple_interest.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program calculate Simple Interest
1+
// // C program calculate Simple Interest
22

33
// // Header Files
44
#include <stdio.h>

02_operators/14_compound_interest.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program calculate Compound Interest
1+
// // C program calculate Compound Interest
22

33
// // Header Files
44
#include <stdio.h>

02_operators/15_is_even_by_bitwise.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to check whether a number is Even or Odd using Bitwise operator
1+
// // C program to check whether a number is Even or Odd using Bitwise operator
22

33
// // Header Files
44
#include <stdio.h>
@@ -13,9 +13,9 @@ int main()
1313

1414
// // Using if-else
1515
// // if (num & 1)
16-
// // printf("\n%d is an Odd Number\n", num);
16+
// // printf("\n%d is an Odd Number\n", num);
1717
// // else
18-
// // printf("\n%d is an Even Number\n", num);
18+
// // printf("\n%d is an Even Number\n", num);
1919

2020
// // Using Conditional Operator
2121
printf(num & 1 ? "%d is an Odd Number\n" : "%d is an Even Number\n", num);

02_operators/16_make_last_digit_zero.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to convert last Digit of a Number into Zero => Digit = 245 Make it => 240.
1+
// // C program to convert last Digit of a Number into Zero => Digit = 245 Make it => 240.
22
// // 👉 Output => Result After Converting Last Digit of 245 into 0 => 245
33

44
// // Header Files

02_operators/17_product_of_real.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to Find Product of Two Real Numbers
1+
// // C program to Find Product of Two Real Numbers
22

33
// // Header Files
44
#include <stdio.h>

02_operators/18_pos_of_first_1_in_bin.c

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to find Position of first 1 when searching from LSB to MSB.
1+
// // C program to find Position of first 1 when searching from LSB to MSB.
22

33
// // Header Files
44
#include <stdio.h>
@@ -15,16 +15,16 @@ int main()
1515
// // // // 1st Approach
1616
// // if (copyNum)
1717
// // {
18-
// // while (!(num & 1))
19-
// // {
20-
// // num >>= 1;
21-
// // position++;
22-
// // }
18+
// // while (!(num & 1))
19+
// // {
20+
// // num >>= 1;
21+
// // position++;
22+
// // }
2323

24-
// // printf("\nPostion of First 1 In the Binary of %d => %d\n", copyNum, position);
24+
// // printf("\nPostion of First 1 In the Binary of %d => %d\n", copyNum, position);
2525
// // }
2626
// // else
27-
// // printf("\nThere is No 1 in the Binary of 0\n");
27+
// // printf("\nThere is No 1 in the Binary of 0\n");
2828

2929
// // // // 2nd Approach
3030
while (num)

02_operators/19_print_ascii.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to take a Character as an input and print its ASCII Code
1+
// // C program to take a Character as an input and print its ASCII Code
22

33
// // Header Files
44
#include <stdio.h>

02_operators/20_unit_digit.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to print Unit digit of a number
1+
// // C program to print Unit digit of a number
22

33
// // Header Files
44
#include <stdio.h>

02_operators/21_print_without_last_digit.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to print a Number without its Last Digit
1+
// // C program to print a Number without its Last Digit
22

33
// // Header Files
44
#include <stdio.h>

02_operators/23_inr_to_usd.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to take amount in INR and convert it into USD, Where 1 USD = 83.19
1+
// // C program to take amount in INR and convert it into USD, Where 1 USD = 83.19
22

33
// // Header Files
44
#include <stdio.h>

02_operators/24_store_negative.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to Store -8 in a Variable using Bitwise operator. You cannot Directly Assign -8 to a Variable.
1+
// // C program to Store -8 in a Variable using Bitwise operator. You cannot Directly Assign -8 to a Variable.
22

33
// // Header Files
44
#include <stdio.h>

02_operators/25_sum_of_digits.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to input Three Digit Number and calculate Sum of it's Digits
1+
// // C program to input Three Digit Number and calculate Sum of it's Digits
22

33
// // Header Files
44
#include <stdio.h>

02_operators/26_swap_two_vars.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to Swap values of Two int Variables. You can use Two or Three Variables
1+
// // C program to Swap values of Two int Variables. You can use Two or Three Variables
22

33
// // Header Files
44
#include <stdio.h>

02_operators/27_swap_two_without_third.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to Swap values of Two int Variables without using Third Variable
1+
// // C program to Swap values of Two int Variables without using Third Variable
22

33
// // Header Files
44
#include <stdio.h>

02_operators/28_swap_using_xor.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to Swap values of Two int Variables without using Bitwise XOR (^)
1+
// // C program to Swap values of Two int Variables without using Bitwise XOR (^)
22

33
// // Header Files
44
#include <stdio.h>

02_operators/29_comma_operator.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to Demonstrate the use of Comma Operator (,)
1+
// // C program to Demonstrate the use of Comma Operator (,)
22

33
// // Header Files
44
#include <stdio.h>

02_operators/30_conditional_operator.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to Demonstrate the use of Conditional Operator ( ? : )
1+
// // C program to Demonstrate the use of Conditional Operator ( ? : )
22

33
// // Header Files
44
#include <stdio.h>

03_decision_control_instructions/01_is_even.c

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// // C program to check whether a given number is an even number or an odd
1+
// // C program to check whether a given number is an even number or an odd
22

33
// // Header Files
44
#include <stdio.h>
@@ -19,21 +19,21 @@ int main()
1919

2020
// // 2nd Approach (using & Bitwise AND operator)
2121
// // if (num & 1)
22-
// // printf("\n%d is Odd", num);
22+
// // printf("\n%d is Odd", num);
2323
// // else
24-
// // printf("\n%d is Even", num);
24+
// // printf("\n%d is Even", num);
2525

2626
// // 3rd Approach
2727
// // if (num / 2.0 - num / 2 == 0)
28-
// // printf("\n%d is Even", num);
28+
// // printf("\n%d is Even", num);
2929
// // else
30-
// // printf("\n%d is Odd", num);
30+
// // printf("\n%d is Odd", num);
3131

3232
// // 4th Approach
3333
// // if (num / 2 * 2 == num)
34-
// // printf("\n%d is Even", num);
34+
// // printf("\n%d is Even", num);
3535
// // else
36-
// // printf("\n%d is Odd", num);
36+
// // printf("\n%d is Odd", num);
3737

3838
printf("\n");
3939
getch();

0 commit comments

Comments
 (0)