New ! Computer Science MCQ Practise Tests

12th Standard Computer Science English Medium Importing C++ Programs in Python Reduced Syllabus Important Questions With Answer Key 2021

12th Standard

    Reg.No. :
  •  
  •  
  •  
  •  
  •  
  •  

Computer Science

Time : 01:00:00 Hrs
Total Marks : 100

      Multiple Choice Questions


    16 x 1 = 16
  1. Which of the following is not a scripting language?

    (a)

    JavaScript

    (b)

    PHP

    (c)

    Perl

    (d)

    HTML

  2. 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

  3. 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

  4. getopt() will return an empty array if there is no error in splitting strings to

    (a)

    argv variable

    (b)

    opt variable

    (c)

    args variable

    (d)

    ifile variable

  5. Identify the function call statement in the following snippet.
    if __name__ =='__main__':
    main(sys.argv[1:])

    (a)

    main(sys.argv[1:])

    (b)

    __name__

    (c)

    __main__

    (d)

    argv

  6. What does __name__ contains ?

    (a)

    c++ filename

    (b)

    main() name

    (c)

    python filename

    (d)

    os module name

  7. Which of the following is not general purpose language?

    (a)

    Python

    (b)

    Perl

    (c)

    Java

    (d)

    C++

  8. Which of the following can act both as scripting and general purpose language?

    (a)

    Python

    (b)

    C

    (c)

    C++

    (d)

    Html

  9. Which is a programming language designed for integrating and communicating with other programming languages?

    (a)

    Modular language

    (b)

    Procedural language

    (c)

    Scripting language

    (d)

    Procedural language

  10. A programming language requires

    (a)

    Complier

    (b)

    Interpreter

    (c)

    Modules

    (d)

    Scripts

  11. How many ways are there to create python interface?

    (a)

    4

    (b)

    3

    (c)

    5

    (d)

    Many

  12. How many options getopt provides to enable command line argument parsing?

    (a)

    3

    (b)

    7

    (c)

    2

    (d)

    4

  13. Which of the following is a built - in variable which evaluates to the name of the current module?

    (a)

    - - main - -

    (b)

    - - getopt - -

    (c)

    - - name - -

    (d)

    - - sys - -

  14. __________ is both a python like language for writing C extensions.

    (a)

    Boost

    (b)

    Cython

    (c)

    SWIG

    (d)

    Ctypes

  15. __________ method returns value consisting of two elements.

    (a)

    sys.argv

    (b)

    oS.system ( )

    (c)

    getopt ( )

    (d)

    none of these

  16. _________ comlnwia of 'os' -moduleexecutiSthe exe file to get the desired output.

    (a)

    Main ( )

    (b)

    Name ( )

    (c)

    Run ( )

    (d)

    System ( )

    1. 2 Marks


    11 x 2 = 22
  17. What is the theoretical difference between Scripting language and other programming language?

  18. Differentiate compiler and interpreter

  19. Write the expansion of (i) SWIG (ii) MinGW

  20. What is the use of modules?

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

  22. Differentiate static typed language and dynamic typed language.

  23. What is garbage collection in python?

  24. What is the use of GNU C complier?

  25. What does cd command refers?

  26. Write a note on
    (i) CD command
    (ii) CIs command

  27. What is meant by module?

    1. 3 Marks


    9 x 3 = 27
  28. Differentiate PYTHON and C++

  29. What are the applications of scripting language?

  30. What is MinGW? What is its use?

  31. Identify the module ,operator, definition name for the following
    welcome.display()

  32. What is sys.argv? What does it contain?

  33. Write a note on
    (i) sys module
    (ii) OS module
    (iii) getopt module

  34. List the commonly used python interfaces.

  35. How to import modules in python?

  36. Write an algorithm for executing c++ program pali_cpp.cpp using python program.pall.py.

    1. 5 Marks


    7 x 5 = 35
  37. Write any 5 features of Python.

  38. Explain each word of the following command.
    Python -< filename.py >- < i > <C++ filename without cpp extension >

  39. What is the purpose of sys,os,getopt module in Python.Explain

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

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

  42. Write a python program to execute the following C++ program.
    /*. To check whether the number is palindrome or not using while Ioop.*/
    // Now select File- > New in Notepad and type the C++ program
    #include < iostream >
    using namespace std;
    intmain ( )
    {
    int n, num, digit, rev = 0;
    cout<<  "Enter a positive number: ";
    cin >>num;
    n= num;
    while(num)
    {digit = num % 10;
    rev = (rev " 10) + digit;
    num = num / 10; }
    cout<< II The reverse of the number is: " << rev < if(n == rev)
    cout< < II The number is a palindrome";
    else
    cout << II The number is not a palindrome";
    return 0;
    }
    // Save this file as pali_cpp.cpp

  43. Write a python program to execute the following C++ program.
    Transpose of a matrix(2 D array) C++ program:
    #include < iostream >
    using namespace std;
    int main ( )
    {
    int a[3][3], i, j;
    for(i=0; i< 3; i++)
    {
    for(j=0; j<3; j++)
    {cout<< "enter the value for
    array["<< i+ 1<< "]"<< " ["<< j+ 1<< "] :";
    cin >>a[i][j];
      }
    }
    system ("cIs");
    cout<< "\n\nOriginal Array\n";
    for(i=0; i<3; i++) {
    for(j=0; j<3; j++ )
    cout<< a[i][j]«' ';
    cout<< endl; }
    cout<< "\n\n The Transpose of Matrix\n";
    for (int i = 0; i < 3; i++)

      for (int j = 0; j < 3; j++)
    cout<< a[j][i]<< ' ';
    cout<< endl;

    return 0;
    }
    // Save this file as trans_cpp.cpp

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

TN 12th Standard Computer Science free Online practice tests

Reviews & Comments about 12th Standard Computer Science English Medium Importing C++ Programs in Python Reduced Syllabus Important Questions With Answer Key 2021

Write your Comment