ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

What will happen if you dont write #include<stdio.h> in a C programe?

user-image
تم إضافة السؤال من قبل himanshu mittal
تاريخ النشر: 2013/06/27
Daanish Rumani
من قبل Daanish Rumani , Product Manager , Publicis Sapient

The code will compile but you would not be able to use printf() and scanf().
You can write programs that do not need to use the console like a web server! Further you can write your own implementation of printf() and scanf() using C/assembly code if you desire to reinvent the wheel.
Many games may be already written that may not be using printf() and scanf() but use other libraries such as OpenGL, DirectX etc.

dinesh kumar
من قبل dinesh kumar , Software engineer , Srivari infotech

means standard input output , if u print "hello " means .
if need this header file, if any think process in c language very important need in this head file, with out this header file , u dont access and run this program.
error will occur while compile time.

Wrishin Bhattacharya
من قبل Wrishin Bhattacharya , Graduate Trainee , Tata Consultancy Services

#include is known as Pre-processor Directive.
it means that the programmer is giving a direction to the C-compiler that it should include or attach the "stdio" header file before processing the code written afterwards.
Without this directive the code will not work at all.

BHASKAR JANA
من قبل BHASKAR JANA

stdio.h stands for standard input output.And .h means header file.So if we don't use this we can't access the program as well as program will not be run(because there is no header file)

Karthick Ravi
من قبل Karthick Ravi

#include is the command used to include all the predefined functions from the library to the program, while compiling...If we not use that, no problem for Turbo IDE.It will work...

Preetham D
من قبل Preetham D , Software Engineer / Senior Software Engineer , Mindtree

Even if u do not include u can execute the basic programs, but you cannot use standard functions which is defined in the library function/header "stdio.h>" which will ultimately lead you the system crash/error.

himanshu mittal
من قبل himanshu mittal

you all are partially correct.
the code won't compile.
because the printf and scanf methods are not linked unless we write #include

Muhammad Usman
من قبل Muhammad Usman , Assistant Manager , Pakistan Steel Mills

We use #include to add library of functions for use in C Language.
If we use some functions in our program but not added its library using #include, C Language Program cannot compile and generate errors.
invalid functions.

All the information given by siniya pn is absolutely correct but one thing, without # program may not execute or run.

siniya pn
من قبل siniya pn , Senior document controller/ project coordinator , Barek engineering

#include is the commands that essentially pastes previously written code into your program.stdio.h is a header file, where this and other similar functions are defined.
stdio.h stands for standard input output header.
symbols instead of "" means the header is located in the standard search path.

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟