473,387 Members | 1,530 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,387 software developers and data experts.

why does the program below work without #include<stdio.h>?

I use to think that printf was actually defined in stdio.h
I mean the body and not the prototype. So I am confused where is printf defined, is it in the compiler?

Expand|Select|Wrap|Line Numbers
  1. int printf(const char *restrict,...);
  2. int scanf(const char *restrict,...);
  3. int main(void)
  4. {
  5.    int m;
  6.    printf("Enter an integer\n");
  7.    scanf("%d",&m);
  8.    printf("You entered %d\n",m);
  9.    return 0;
  10. }
Apr 12 '12 #1
1 1355
weaknessforcats
9,208 Expert Mod 8TB
Because function prototypes have been provided.

I have the feeling I am doing your homework. Am I right?
Apr 12 '12 #2

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

Similar topics

6
by: anon | last post by:
How *EXACTLY* does Smart Navigation work? (I would really really really like for this Smart Navigation to work in Mozilla.) The inner workings and the code is what I am looking for. Does it...
1
by: John | last post by:
Hi, Does Dotfuscator really work? I mean is there no way to decompile your program when it's done? Or does it just make it more difficult to work with the decompiled code? Also, is there...
2
by: Vincent van Beveren | last post by:
I have the following (seemingly) useless piece of JavaScript <html> <head> <script type="text/javascript"> function frameMe() { s = "document.open();"; s +=...
12
by: Frank Hauptlorenz | last post by:
Hello Out there! I have a DB2 V7.2 Database (Fix11) on Win 2000 Professional. It was before a NT 4 based Domain - now it is a Win 2000 Domain. The database server is a domain member. Now...
10
by: Jarod | last post by:
Hey var service = this.WebServiceURL +"/SessionFun?sessionID="+ this.SessionID ; var xmlDoc=document.implementation.createDocument("", "", null); try {
8
by: Scorpio | last post by:
Hi all, I found the simple program below, no error, no warning. But it can work with no output. Does anyone know why? int main() { 0; }
13
by: 7stud | last post by:
I have the following two identical clients #test1.py:----------- import socket s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) host = 'localhost' port = 5052 #server port
1
by: RamyaSrinath | last post by:
hi all...... please tell me , how session variables and cookies are related to each other and also how session variables work without cookies.
5
by: amarqujo | last post by:
Hi, I have this piece of code and I need to get the value of the variable 'filmus1" into the audioplayer line. <p id="audioplayer_m">blabla</p> <script type="text/javascript"...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.