Urgenthomework logo
UrgentHomeWork
Live chat

Loading..

Input Output Homework Help

For Input-Output in C we use following

%c ----- Char
%d ----- Int
%f ----- Float

Let us illustrate this by an example:

Reading some integer from keyboard

#include <stdio.h>
int main()
{
int x;
scanf(“%d”, &x);
printf(“%d”,x);
return;
}

Scanf Function is use to take Keyboard Input. We will discuss other input functions in details later. Printf Function is use to display output.

In this example, a Variable of type Int is defined. Initially it will take any garbage value, because we haven’t assigned any value to it. While executing the next line of code, the computer will wait for user to enter a value. The entered value will be assigned to x. Do not forget to put ‘&’ before x. In the Printf Function, %d will be replaced by the new value of x.

Need Help with input output c language contact with us, we give you right direction for your homework and assignment.

Input Output Homework Help

Topics in C Programming

Copyright © 2009-2023 UrgentHomework.com, All right reserved.