1.what are the problems you face when calling a C function from C++ function ? How to avoid that?
'Extern C'
{
#include<myfile.h>
}
2.Apple and orange puzzle?.
3.90 teams. The teams are divided into pairs and the one fails, will be eliminated,How many matches to be conducted to find the champion?
4.Select query to get the names (unique) in the student table select distinct name FROM 'student'
5.In a file , how the newline separated entries will be converted to comma separated
fstream FObj;
FObj.open("test.txt",ios::in);
fstream FObj1("test1.txt",ios::out);
string strTemp,strValue;
while(getline(FObj,strTemp)) {
strValue += strTemp;
strValue += ",";
}
FObj.close();
FObj1<<strValue;
FObj1.close();
6.whats the unix command to list the directories alone in the current directory?
Ls -d */
7.Reverse String given the function definition void reverseString(char *input,char **output) .U have to fill the remaining code.
#include <iostream>
using namespace std;