Online Test

:

 

What are mandatory parts in function declaration?


What are the advantages of passing arguments by reference?


The difference between x and ‘x’ is


How many parameters are required for sort_heap function?


What is the output of this program?

    #include <iostream>
    using namespace std;
    int main()
    {
        double a = 21.09399;
        float b = 10.20;
        int c ;
        c = (int) a;
        cout << c ;
        c = (int) b;
        cout << c ;
        return 0;
    }

 What is the output of this program?

   #include <iostream.h>
    using namespace std;
    #define MAX 10
    int main()
    {
        int num;
        num = ++MAX;
        cout << num;
        return 0;
    }

What will be the output of the following program?

#include<iostream.h> 
void MyFunction(int a, int b = 40)
{
    cout<< " a = "<< a << " b = " << b << endl;
}
int main()
{
    MyFunction(20, 30);
    return 0; 
}

Given a class named Book, which of the following is not a valid constructor?


Which of the following is false?


What punctuation is used to signal the beginning and end of code blocks?


 Where does the exceptions are used?


What is the output of this program?

   #include <iostream.h>
    using namespace std;
    const int SIZE = 10;
    class safe
    {
        private:
        int arr[SIZE];
        public:
        safe()
        {
            register int i;
            for (i = 0; i < SIZE; i++)
            {
                arr[i] = i;
            }
        }
        int &operator[](int i)
        {
            if (i > SIZE)
            {
                cout << "Index out of bounds" <<endl;
                return arr[0];
            }
            return arr[i];
        }
    };
    int main()
    {
        safe A;
        cout << A[5];
        cout  << A[12];
        return 0;
    }

To what kind of elements does non-modifying sequence algorithm can be
applied?


 What is the output of this program?

#include <iostream.h>
    using namespace std;
    void mani()
    void mani()
    {
        cout<<"hai";
    }
    int main()
    {
        mani();
        return 0;
    }

What is the output of this program?

#include <iostream.h>
    using namespace std;
    #define PI 3.14159
    int main ()
    {
        float r = 2;
        float circle;
        circle = 2 * PI * r;
        cout << circle;
        return 0;
    }
 

About Us

TechEpi.com is an online learning website.We cover the latest tech news,online tutorials,blog,online test for Aptitude,C,Java,PHP to improve your knowledge.

Newsletter


Follow TechEpi on