- 4

C program

#include<stdio.h> #include<conio.h> Void main() { clrscr(); print("Hello world"); getch(); }

27th Sep 2021, 1:44 PM
Kripa Shankar. Saroj
8 Respuestas
+ 1
Kripa Shankar. Saroj C is a case sensitive language, void and Void are different, use "void" not "Void" and try to avoid using turbo c++, you can use any other modern compiler like Code blocks, DevC++, VS code etc
27th Sep 2021, 2:09 PM
Rupali Haldiya
Rupali Haldiya - avatar
+ 1
Martin Taylor , oh ok, not sure about full functionality I just tried things like clear screen and it seemed to work for me. Some functions might print garbage.....
27th Sep 2021, 3:24 PM
Aleksei Radchenkov
Aleksei Radchenkov - avatar
+ 1
"there are other standard libraries such as #include <curses.h>" I'm pretty sure ncurses(old name)/curses too, is a non-standard.
27th Sep 2021, 3:44 PM
Rellot's screwdriver
Rellot's screwdriver - avatar
0
What exactly is your question???
27th Sep 2021, 1:45 PM
Aleksei Radchenkov
Aleksei Radchenkov - avatar
0
Kripa Shankar. Saroj Do you know what a question is?
27th Sep 2021, 1:48 PM
Simon Sauter
Simon Sauter - avatar
0
Kripa Shankar. Saroj ,Alright conio.h is incompatible with most modern compilers, and of course you can't use it on Sololearn there are other standard libraries such as #include <curses.h> that will give you conio.h functionality and more...(which btw works on sololearn)
27th Sep 2021, 1:52 PM
Aleksei Radchenkov
Aleksei Radchenkov - avatar
0
rupali , yeah right I didn't even notice that void)) also main function must be int and return either 1 or 0...
27th Sep 2021, 2:15 PM
Aleksei Radchenkov
Aleksei Radchenkov - avatar
0
Rellot's screwdriver ,Curses.h is standard in most compilers. It is not standard in some versions of GCC, but it is mostly standard... And so is ncurses.h
27th Sep 2021, 3:50 PM
Aleksei Radchenkov
Aleksei Radchenkov - avatar