Questions tagged [turbo-c]

Turbo C was an Integrated Development Environment and compiler for the C programming language from Borland, released in 1987. It had been re-release as freeware version 2.01 by 2006.

First introduced in 1987, it was noted for its integrated development environment, small size, fast compile speed, comprehensive manuals and low price.

Today, Turbo C is considered obsolete. It is a 16-bit compiler for DOS environments, and as such cannot access more than 640 KB of memory (and even that only with difficulty), and cannot interoperate with 32- and 64-bit code in modern operating systems. Additionally, due to its age, its standard library differs in some significant fashions from modern C libraries. Plainly put, it is not an appropriate tool for many development tasks today.

Despite this, it is sometimes used in introductory C programming courses, particularly in India. Students using Turbo C should keep its limitations in mind.

273 questions
-3
votes
1 answer

Runtime error while compiling

Why do i get runtime eror when running this code in gcc compiler?? It works fine in turboC. I have been working on this for couple of days with no progress at all. Kindly help. #include int main() { int T,i=0,num,sum,temp,j; int…
-3
votes
3 answers

Error C language

This code cannot convert char* to char**. I don't know what it means. Here is my code: #include #include #include shift( char *s[] , int k ) { int i,j; char temp[50]; for( i = 0 ; i < k ; i++ ) …
-3
votes
1 answer

Check if prime number using recursive and no loop in turbo c

Good Day, I'm trying to make a code that would determine the prime numbers between two numbers. This should be done recursively and without any loop. So far I have this code: #include #include void prime(int x, int y){ int…
magicianiam
  • 1,474
  • 7
  • 33
  • 70
-3
votes
2 answers

How to store Function's Return in a Variable in C

I coded a C Program as below:- #include #include #include char getPositions(int randNo, int guessNo); void main() { char positions[6]; clrscr(); positions = getPositions(5242, 5243); …
rkaartikeyan
  • 1,977
  • 9
  • 29
  • 57
-4
votes
1 answer

why value of parameter inside void main function in C is initialised with 1?

#include #include #include void main(main) { clrscr(); printf("%d",main +=pow(++main,++main)); getch(); } So, i have run the above code in turboC compiler n got the output 12. i have noticed here the value of…
-4
votes
1 answer

What is the purpose or equivalent of the umlaut 'A' in C?

I saw an umlaut 'A' in C for two times. When i open it in Turbo C, i can't find it but when i open it in notepad it shows.Also i saw it in a book (i can't give the source because it is local) and a number 3 that looks like an exponent. Any idea what…
Dars Devs
  • 3
  • 3
-4
votes
4 answers

Logical test fails in program with unexpected output

I have the folliwing code: void main() { int a=30,b=40,x; x=(a!=10) && (b=50); printf("x=%d",x); } Here in the result I get x=1. In && operator the condition true only when both are true here the first is true i.e a not equal to…
Gunjan Raval
  • 141
  • 8
-4
votes
2 answers

Getting error Cannot convert 'int' to 'char *'

I want to store name of states and their capital in 2D array like this State | Capital ----------|-------- Bihar | Patna ----------|-------- Jharkhand | Ranchi ----------|-------- Gujarat | Gandhinagar I tried to do this by code below…
user3599755
  • 93
  • 3
  • 11
-4
votes
1 answer

Errors in Data Structure program using C to concatenate two strings

#include #include #include void main() { char *s1, *s2, *s3; int length, len1=0,len2=0, i, j; clrscr(); s1=(char*)malloc(20* sizeof(s1)); s2=(char*)malloc(20* sizeof(s2)); printf("Enter first string\n"); …
-4
votes
1 answer

Image output in C

Quick question, is there a way to show an image(ex. bmp) from file using C? It's not in graphics.h apparently, and I can't use Allegro because it does not support Borland(or so I've read). I need to use the very old compiler for a school project. I…
berdi9
  • 23
  • 12
-4
votes
1 answer

Execute sql statement

I used gcc compiler, MySQL Server 5.0 When I use a long length string as a value to insert or update or select or delete, system doesn't work. No error comes. So I could not find the error. A part of my code is this : mysql_query(conn, sql);
Santanu
  • 1
  • 5
-4
votes
1 answer

fwrite been writing a wrong character into the file in C

i been trying out an simple encryption algorithm, which is actually been used to encrypt 2 words, i tried with abcabc in the image.jpg file, and then the encrypted data should be coming out as aboabo for the key AB (please note its…
-5
votes
3 answers

make gives me a error I don't understand with TurboC

I am trying to learn C, for fun. I am using a Linux distro. I am trying to compile a program which uses kbhit(). I found a way to this with TurboC (http://www.sandroid.org/TurboC/#Download). I followed the instructions but make gives me…
Fabien
  • 3
  • 2
-5
votes
1 answer

Default values in turbo c

I'm getting the output as -28762.Why is it not 0(zero), which should be the default value of integer? #include #include void main(){ int a; clrscr(); printf("%d",a); getch(); }
Nitesh
  • 17
  • 2
-5
votes
1 answer

Simple ways to compare two strings without Strcmp in c

I need to compare the user enter values in string two string without using Inbuilt functions or(strcmp) in c. i have used first program by using other languages its not working so i have created the second one as working in c ,is there any better…
Mohamed Sahir
  • 2,482
  • 8
  • 40
  • 71
1 2 3
18
19