CrazyEngineers
  • Execute your C program code without <stdio.h> and <conio.h>

    Koushal Patel

    Member

    Updated: Oct 26, 2024
    Views: 1.3K
    Anybody tried running C Program without the use of the header file declaration? If you are using Turbo C compiler, please let me know what is the output. Run any random program! Is there any chance of not using these header files and run the program error free? Want to learn!
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • rahul69

    MemberJan 29, 2015

    Koushal Patel
    Anybody tried running C Program without the use of the header file declaration? If you are using Turbo C compiler, please let me know what is the output. Run any random program! Is there any chance of not using these header files and run the program error free? Want to learn!
    Header-files are included to do the messy work for you, You can avoid header file declarations if u are going to do it by yourself.
    For example, if u want to use clrscr() for clearing the screen,but don't want to include <conio.h>, u can use system call directly using the function system("cls");
    inside your program. 😀
    Are you sure? This action cannot be undone.
    Cancel
  • pratap singh, upendra

    MemberApr 7, 2015

    rahul69
    Header-files are included to do the messy work for you, You can avoid header file declarations if u are going to do it by yourself.
    For example, if u want to use clrscr() for clearing the screen,but don't want to include <conio.h>, u can use system call directly using the function system("cls");
    inside your program. 😀
    What are the other possible system calls that can make our life easier? I am asking for basic systems calls only.
    Are you sure? This action cannot be undone.
    Cancel
  • Vishal Sharma

    MemberApr 8, 2015

    proffy
    What are the other possible system calls that can make our life easier? I am asking for basic systems calls only.
    By system call he means, the command prompt commands as far as I understand the post. To execute those commands you anyway need to require or include stdlib.h header as system() is defined in that header
    Are you sure? This action cannot be undone.
    Cancel
  • rahul69

    MemberApr 19, 2015

    Vishal0203
    By system call he means, the command prompt commands as far as I understand the post. To execute those commands you anyway need to require or include stdlib.h header as system() is defined in that header
    You are correct. But it was just an abstract example to emphasize on the concept rather than the actual underlying process of conversion, explaining which would have added to the confusion (with the details of macro implementations etc.)

    proffy
    What are the other possible system calls that can make our life easier? I am asking for basic systems calls only.
    You can call any command which can be used in our command prompt, eg:
    echo, ping etc.
    Are you sure? This action cannot be undone.
    Cancel
  • Rahulkumar200

    MemberMay 2, 2015

    YOU CAN RUN PROGRAMS WITHOU USING <CONIO.H>.
    LIKE THIS:-
    [HASHTAG]#INCLUDE[/HASHTAG]<STDIO.H>
    INT MAIN()
    {
    PRINTF("LIKE THIS");
    }

    and many more!!!!!!!!!!!!!1
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register