+ 1
Will anyone explain why this programm not showing correct output on turbo c ide on pc??
8 Answers
+ 16
Plz stop using turbo c/c++ it's too old.
https://www.sololearn.com/Discuss/288609/?ref=app
+ 2
Does it show correct output in another compiler? if not, then check the code for flaws.
+ 2
Thank u soo much
+ 2
Because turbo C is a 30 year old compiler that died before you were born. (I assume you're under 20)
+ 2
#include <iostream>
using namespace std;
#include <fstream>
#include <stdio.h>
#include <string.h>
int main()
{
char name[10];
int roll;
ofstream out;
ifstream in;
out.open("student");
cout<<"enter your name";
cin>>name;
cout<<"\nenter your roll";
cin>>roll;
out<<name<<endl;
out<<roll<<endl;
out.close();
roll=0;
strcpy(name,"noname");
in.open("student");
in>>roll;
in>>name;
cout<<"\nyour roll is "<<roll<<endl;
cout<<"\nyour name is "<<name<<endl;
in.close();
}