Noob question in C programming

Alex0808

BANNED
Joined
May 24, 2019
Messages
378
Reaction score
151
It is in my university semester as an Introduction to C
https://imgur.com/a/knawOBe

When I hit the Enter button, this blinking cursor goes down to next line but don't slide down the text on it's right hand side.
How to fix it because it was working when I first opened this application (turbo c++)
 
Try to add " after the text you want to print and use ) instead of }

#include whatever

int main() {
clrscr();
print("text");

return 0;
}
 
Thanks for the mention @MisterF. :)
I am not a C/C++ guy, but..

Op, your code is pretty much messed up. It shouldn't compile atall. Try the solution @stoat posted. You are missing the {} in the main function. You are also missing the end quote for print.

Alternatively, try the following:
Code:
#include <stdio.h>
#include <conio.h>

int main(){
    printf("\nHello World");
    return 0;
}
It should give you desired result.

P.s. part of the problem is the turbo c editor/ compiler itself. That program sucks man. Use dev c++, it is a lot better than turbo C++.
 
Last edited:
I'm pretty sure you accidentally hit the Insert key.

This will make it so that you override the input following the cursor, but also have the exact effect you described.
To fix the problem, just hit it again.

On an unrelated note, if you have the choice, do not use Turbo C++. It is discontinued, and has been for over 10 years.
 
Back
Top