Happy Codings - Programming Code Examples
Html Css Web Design Sample Codes CPlusPlus Programming Sample Codes JavaScript Programming Sample Codes C Programming Sample Codes CSharp Programming Sample Codes Java Programming Sample Codes Php Programming Sample Codes Visual Basic Programming Sample Codes

C Programming Code Examples

C > If Else and Switch Case Code Examples

find all roots of a quadratic equation using switch case

Switch Case Statements Break Statement - Lets see a sample without break statement, then we will discuss switch case with break 'Switch Case' statement is mostly used with 'break statement' even though the break is

C Code Calculate a floating-point average - C Program code to Calculate a floating-point average using pointers. Memory allocation failed. Terminating program. Output the average. The average of the the values you...

Find last Occurrence of Character in String - C program to input any String from user and find the Last occurrence of a given character in the string. Input String from user, 'Store it' in some variable say 'str'. Declare a index =-1

C++ Code Sample Preprocessor Directives - There are different "Preprocessor Directives" that perform different tasks. Lets categorize preprocessor directives. Inclusion directives: "#include": specifies the files to be included,

Count total number of Vowels Consonants - C program to find total number of vowels and consonants in a string using 'Loop and If Else'. 'Input String', store it in some variable say str. Initialize 2 other variables to store vowel and

C++ Compute Combinations by Factorials - Prints a total number of combination possible for given n and r value. The "time complexity" of this algorithm is O(n). This algorithm takes the input of n and r value. Function to find the

Count Vowels in a String in C++ Language - Write a 'C++' program which Counts numbers of vowels in a given string and tell every index where a 'Vowel is Found'. Size of array is fixed using the constant variable. We enter a string

C Check a Number is Divisible by 5 and 13 - Check whether a number is divisible by 5 and 13 or not using if else. A number is divisible by some other number if it gives 0 as remainder. To check if a number is exactly divisible by a...