C program to print Armstrong number between 100 and 999?

In this example we will focus on finding and then print Armstrong numbers between the limit from 100 to 999. Before proceeding to our code let’s find out concept Armstrong numbers. What is called as Armstrong? Armstrong number is determined based on sum of cube of its digits. If a number equals to addition of … Read moreC program to print Armstrong number between 100 and 999?

C program to print your name on screen

In this exercise, we will write code to print user entered input name on the console screen. Pre-requisites: Input output function, data types, string Approach: First declare the required variable i.e. string or character array Use scanf() function to read entered name into string Use printf() function to display name onto the screen This program … Read moreC program to print your name on screen

C program to print hello world 10 times

In this program we will print hello world 10 times using while loop. There are different approach to print this message and we will see one of them using while loop. Pre-requisites: Input output functions, while loop Approach: First declare counter variable i and initialize it to 0. Use while loop with condition i is … Read moreC program to print hello world 10 times

C program to print an integer value

In this program scenario, we will see how to take an integer as input from user and print an integer value to console screen. Pre-requisites: Input output functions, data types, variables Approach: An integer data can be considered as any whole number. Integer values are present with no fractional or floating point values. Here understand … Read moreC program to print an integer value

C program to print %% special symbol in c

In this example we will see how to print the special symbols %% in c. These special symbols tells compiler to do task when used in conjunction with some letters. Pre-requisites: Special symbols, keywords, input output functions How this thing functions? % is used in conjunction with the characters to denote type of data we … Read moreC program to print %% special symbol in c

C program to print a string

In this program, we will see how to print user provided string in c. There are multiple methods that can be implemented to write this program. We will take user provided input here that can be word or sentence and then print it on screen. Pre-requisites: Input output functions, string, pre-defined methods Approach: First take … Read moreC program to print a string

C program to print each character of string using pointer

In this program, we are going to follow up topic of pointer and how do we use it to print character in strings? So let’s first consider that we have taken a string of 6 characters and we want to access each character and print it but not directly rather using pointer. So pointers are … Read moreC program to print each character of string using pointer

C program to print each character of a string

In this example, we will emphasize on use of strings in c programming. We use strings to hold set of characters that can be sentence or word. So here we will get a string through user input and then try to print that string character by character. We are not printing string as whole rather … Read moreC program to print each character of a string

C program to find sum of even and odd numbers using function

In this program, we will see even or odd number solution with use of function. We will write separate function which will be called from main method to find out even odd numbers. Pre-requisites: Input output statements, main method, function, if else statement Approach: First a function is declared outside main method after including header … Read moreC program to find sum of even and odd numbers using function

C program to print even and odd numbers using while loop

In this program, we are going to find out and print even or odd numbers using while loop. We have already covered another similar example for even or odd numbers. Pre-requisites: While loop, input output statements, if else statement Approach: We will take input from user through command prompt and use it as limit. Limit … Read moreC program to print even and odd numbers using while loop