Category: C

C Program to count the number of digits in an Integer

Problem Write a program in C to cound the number of digits in an integer that was entered by the user. How to count the number of digits in an integer in turbo C ? Output Abundantcode.com Coding sample                                                   Enter an integer: 50102                                                Number of digits: 5

C Program to check if a number is odd or even

Problem Write a program in C language to check whether a given number is even or odd. How to check if a Number is Odd or Even in C ? An integer that is divisible by 2 is an even number and that is not divisible by 2 is an odd number. Example of even number is 2 , 4, 12 etc. Example of an…

C Program to Swap two Numbers without using temporary variable

Problem Write a program in C language to swap two numbers without using temporary variable and display the result in the screen. How to Swap two numbers in C without using temporary variable? Output Abundantcode – Swap two numbers without using temporary variable  Enter First Number: 1                                Enter Second Number: 7                                  FirstNumber = 7.00                                   SecondNumber = 1.00

C Program to find the LCM of two numbers

Problem Write a program in C to find the LCM(Lowest common multiples) of the two numbers given by the user. How to find the LCM of two numbers in C ? Lowest common multiples of two integers refers to the smallest numbers that is perfectly divisble by both the numbers given as input where the value of the remainder is zero. Here’s a program in…