$ என்ற குறியீட்டை 10 முறை வெளியிட கீழ்க்காணும் நிரலில் dispchar() என்ற செயற்கூறை எவ்வாறு அழைப்பாய்?
void dispchar(char ch='$', int size=10)
{
for(int i=1;i<=size;i++)
cout<<ch;
}
கொடுக்கப்பட்ட சிறு நிரலில் பின்வரும் எந்த செயற்கூறு சேர்க்கை, செயற்கூறு பணிமிகுப்பாக எடுத்துக் கொள்ளப்படாது?
voidprint(charA,int B); // F1
voidprintprint(int A, float B); // F2
voidprint(int P=10); // F3
voidprint(); // F4
#include<iostream>
using namespace std;
class Point {
private:
int x, y;
public:
Point(int x1,int yl)
{
x=x1;y=y1;
}
void operator+(Point &pt3);
void show() {cout
<<"x="<<x<<",y="<<y; }
};
void Point::operator+(Point &pt3)
{
x+=pt3.x;
y+=pt3.y;
}
int main()
{
Point pt1(3,2),pt2(5,4);
pt1+pt2;
pt1.show();
return 0;
}
பின்வரும் எந்த செயற்குறி பணி மிகுக்கப்பட்டுள்ளது?
#include<iostream>
using namespace std;
class Point {
private:
int x, y;
public:
Point(int x1,int yl)
{
x=x1;y=y1;
}
void operator+(Point &pt3);
void show() {cout
<<"x="<<x<<",y="<<y; }
};
void Point::operator+(Point &pt3)
{
x+=pt3.x;
y+=pt3.y;
}
int main()
{
Point pt1(3,2),pt2(5,4);
pt1+pt2;
pt1.show();
return 0;
}
#include<iostream>
using namespace std;
class Point {
private:
int x, y;
public:
Point(int x1,int yl)
{
x=x1;y=y1;
}
void operator+(Point &pt3);
void show() {cout
<<"x="<<x<<",y="<<y; }
};
void Point::operator+(Point &pt3)
{
x+=pt3.x;
y+=pt3.y;
}
int main()
{
Point pt1(3,2),pt2(5,4);
pt1+pt2;
pt1.show();
return 0;
}
மேற்கண்ட நிரலின் வெளியீடு என்னவாக இருக்கும்?