Doubts
Doubts
Doubts
1)
#include <iostream.h>
#include <string.h>
#include<conio.h>
return a + b;
strcat(a,b);
return a;
int i=0;
while(i<len){
t[i]=b[i];
i++;
t[i]='\0';
return t;
}
int main() {
clrscr();
getch();
return 0;
3)
#include<graphics.h>
#include<conio.h>
#include<stdio.h>
void main()
float x, y,dx,dy,steps;
setbkcolor(WHITE);
dy = (float)(y1 - y0);
if(dx>=dy)
steps = dx;
else
steps = dy;
dx = dx/steps;
dy = dy/steps;
x = x0;
y = y0;
i = 1;
while(i<= steps)
putpixel(x, y, RED);
x += dx;
y += dy;
i=i+1;
getch();
closegraph();
}
4)
#include<stdio.h>
#include<graphics.h>
#include<dos.h>
#include<conio.h>
//functionforprinting
//messageascoloredcharacter
//autodetection
int gdriver=DETECT,gmode,i;
//initializegraphicsmode
initgraph(&gdriver,&gmode,"C:\\Turboc3\\BGI");
for(i=3;i<15;i++)
//setcolorofcursor
setcolor(i);
//printtextatcoordinatex,y;
outtextxy(20*i,100,s);
delay(500);
cleardevice();
getch();
//driverprogram
int main()
printMsg("eesha");
return 0;
Set 2)
2)
#include<stdio.h>
#include<iostream.h>
#include<conio.h>
int i = 0,flag = 1;
if(num <= 1)
{
flag = 0;
else
flag = 0;
break;
return flag;
int main()
clrscr();
cin>>num1;
cin>>num2;
{
if(isPrimeNumber(i) && isPrimeNumber(i+2))
cout<<"{"<<i<<","<<i+2<<"}\n";
getch();
Set1)
4) move horizontally
#include<stdio.h>
#include<graphics.h>
#include<dos.h>
#include<conio.h>
//functionforprinting
//messageascoloredcharacter
//autodetection
int gdriver=DETECT,gmode,i;
//initializegraphicsmode
initgraph(&gdriver,&gmode,"C:\\Turboc3\\BGI");
for(i=3;i<15;i++)
//printtextatcoordinatex,y;
outtextxy(20*i,100,s);
delay(500);
cleardevice();
getch();
//driverprogram
int main()
printMsg("eesha");
return 0;
2)
#include<iostream.h>
#include<string.h>
#include<conio.h>
class BankAccount {
private:
char depositorName[10];
int accountNumber;
char accountType[20];
double balance;
public:
strcpy(depositorName,"");
accountNumber = 0;
strcpy(accountType,"");
balance = 0.0;
strcpy(depositorName,name);
accountNumber=number;
strcpy(accountType,type);
balance = initialBalance;
balance -= amount;
} else {
void display() {
};
void main(){
BankAccount myAccount;
clrscr();
myAccount.deposit(500.0);
myAccount.withdraw(200.0);
myAccount.display();
getch();