473,395 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

What is the difference between printf and scanf?

could anyone tell me what is d diff between printf and scnaf???
and wat is d diff when i do a/b and a/(float)b and (float)a/b??
thank you
Aug 3 '07 #1
1 3199
Meetee
931 Expert Mod 512MB
could anyone tell me what is d diff between printf and scnaf???
and wat is d diff when i do a/b and a/(float)b and (float)a/b??
thank you
Hi,

I think these are very basic questions if you read any tutorial of C. You try by writing a program which takes two different float and integer values and check the output by dividing them.

Regards
Aug 3 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: sushant | last post by:
hi why do we use '&' operator in scanf like scanf("%d", &x); but why not in printf() like printf("%d" , x); thnx in advance sushant
6
by: alternativa | last post by:
Hi, I have problem with the following function - it was intended to ask a user for a 4-digits number: double ask_for_number (void) { char *notint; char s2; double entered_number;
18
by: ben.carbery | last post by:
Hi, I have just written a simple program to get me started in C that calculates the number of days since your birthdate. One thing that confuses me about the program (even though it works) is...
9
by: jim | last post by:
i want to make a c file that i can 'scanf ' students scores of 2 classes and their names , and i want it to get the sum of the 2 scores and make them in order .at last 'printf' /*am sorry,my...
9
by: Cao Yi | last post by:
Hi, here's a fract of codes, and what's the line "scanf("%lf%*", &cvi)" doing? ============================= do { printf("\nCoefficient: "); scanf("%lf%*", &cvi); getchar(); } while (cvi <=...
3
by: chutsu | last post by:
I got errors: qu2-1.c:66: warning: format '%s' expects type 'char *', but argument 2 has type 'char (*)' qu2-1.c:72: warning: format '%s' expects type 'char *', but argument 2 has type 'char (*)'...
16
by: chutsu | last post by:
Ok Here is a problem, I got a imaginary database program that I need to code, to add a patient I have function inser_patient. but when I try to input the details it doesn't quite work the way I...
17
by: Martin Wells | last post by:
When passing arguments to a VAL function, all integer types are promoted, and floats become doubles. Therefore, signed short will be promoted to signed int. Therefore I can't see any reason why...
6
by: akk003 | last post by:
Hello I'am a returning coder to C programming language and would appreciate if you could help me understand why does my while loop behave normally in the following code: int loop = 1; char...
12
by: broli | last post by:
#include<stdio.h> #include<stdlib.h> struct point { double x, y, z;
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.