Search Results

Search found 10 results on 1 pages for 'anurag18294'.

Page 1/1 | 1 

  • function concept

    - by anurag18294
    void execute(int &x,int y=100) { x=x+y; cout< will the following program work in spite of not assigning a default value to the x(formal parameters in the fuction prototype).

    Read the article

  • Classes and Objects in C++

    - by anurag18294
    class anurag { private: int rollno; char name[50]; int marks; float percen; void percentage(int num) { percen=(num/500)*100; } public: void getdata(void) { cout<<"\n\nEnter the name of the student:"; gets(name); cout<<"\n\nEnter the roll no: and the marks:"; cin>>rollno>>marks; percentage(marks); } void display(void) { cout<<"\n\nThe name of the student is:"; cout.write(name,50); cout<<"\n\nThe roll no: of the student is:"; cout<<rollno; cout<<"\n\n The marks obtained is:"<<marks; cout<<"\n\nThe percentage is:"<<percen; }}; void main() { clrscr(); anurag F; F.getdata(); F.display(); getch(); } why the following code is not giving the desired output?

    Read the article

  • array of objects of a class

    - by anurag18294
    #include class test{ int a; char b; public: test() { cout<<"\n\nDefault constructor being called"; } test(int i,char j) { a=i; b=j; cout<<"\n\nConstructor with arguments called"; } }; int main() { test tarray[5]; test newobj(31,'z'); }; In the above code snippet can we intialize values to tarray[5].

    Read the article

1