Input and Output of an integer C Program

Explanation: This Input and Output of an integer C Program demonstrates the input and output of an integer in C programming language.

The scanf function is used to take input from the user and store it in the variable num. The %d format specifier is used to read an integer value. The ampersand & symbol is used to get the address of the variable num. The printf function is used to print the message “The number you entered is: %d” on the screen.

Input and Output of an integer C Program
Input and Output of an integer C Program
#include <stdio.h>

int main()
    int num;
    printf("Enter a number: ");
    scanf("%d", &num);
    printf("The number you entered is: %d", num);
    return 0;
Enter a number: 4
The number you entered is: 4

Digital Marketing Consultants and Social Media Marketing Expert with over 3 years of rich experience in various Branding, Promotions, business directories, On pages and off page optimization, Link building Advertising, Research, paid advertisement, content writing and marketing

You May Also Like

More From Author


Add yours
  1. 2
    Scarlet Stodden

    Great – I should certainly pronounce, impressed with your site. I had no trouble navigating through all tabs as well as related information ended up being truly simple to do to access. I recently found what I hoped for before you know it at all. Quite unusual. Is likely to appreciate it for those who add forums or something, site theme . a tones way for your client to communicate. Excellent task.

+ Leave a Comment