New ! Computer Science MCQ Practise Tests



Importing C++ Programs in Python Model Question Paper 1

12th Standard

    Reg.No. :
  •  
  •  
  •  
  •  
  •  
  •  

Computer Science

Time : 01:00:00 Hrs
Total Marks : 50
    5 x 1 = 5
  1. Which of the following is a software design technique to split your code into separate parts?

    (a)

    Object oriented Programming

    (b)

    Modular programming

    (c)

    Low Level Programming

    (d)

    Procedure oriented Programming

  2. The module which allows you to interface with the Windows operating system is

    (a)

    OS module

    (b)

    sys module

    (c)

    csv module

    (d)

    getopt module

  3. Which of the following is not a compiled statically typed language?

    (a)

    C++

    (b)

    Java

    (c)

    Python

    (d)

    All of these

  4. Which of the following is a scripting language?

    (a)

    Ruby

    (b)

    ASP

    (c)

    TCI

    (d)

    All of these

  5. Which of the following interface used for interfacing with C programs?

    (a)

    MicGW

    (b)

    Boost

    (c)

    Ctypes

    (d)

    Cython

  6. 5 x 2 = 10
  7. What is the use of modules?

  8. What is the use of cd command. Give an example.

  9. What is garbage collection in python?

  10. What is the use of GNU C complier?

  11. Write a command for wrapping C++ code.

  12. 5 x 3 = 15
  13. What are the applications of scripting language?

  14. What is MinGW? What is its use?

  15. List the commonly used python interfaces.

  16. How to import modules in python?

  17. Write an algorithm for executing C++ program pali_cpp.cpp using python program.pall.py.

  18. 4 x 5 = 20
  19. Write any 5 features of Python.

  20. Write the syntax for getopt( ) and explain its arguments and return values.

  21. Explain the commands for wrapping C++ code.

  22. Write a python program to execute the following C++ program
    To implement Multilevel Inheritance:
    // C++ program to implement Multilevel Inheritance
    // Now select File ⟶New in Notepad and type the C++ program
    c++ Program.
    #include < iostream >
    using namespace std;
    // base class
    class Vehicle
    {
    public:
    Vehicle ( )
    {
    cout<< "This is a Vehicle" << endl;
    }
    };
    class threeWheeler: public Vehicle
    { public:
    three Wheeler ( )
    {
    cout << "Objects with 3 wheels are vehicles" << endl;
      }
    };
    // sub class derived from two base classes
    class Auto: public threeWheeler{
    public: 
    Auto ( )

    cout<< "Auto has 3 Wheels"<< endl;
    };
    // main function
    int main ( )
    {
    //creating object of sub class will invoke the constructor of base classes
    Auto obj;
    return 0;
    }
    // Save this file as inheri_cpp.cpp

*****************************************

Reviews & Comments about 12th Computer Science - Importing C++ Programs in Python Model Question Paper 1

Write your Comment