...
Showing posts with label quiz. Show all posts
Showing posts with label quiz. Show all posts

Tuesday, 18 August 2015

C++ Beginner Level Assignment




“Great ability develops and reveals itself increasingly with every new assignment.”


Assignment Details: Create Functions where required. This Assignment will give you opportunity to grasp all your concepts at the beginner level. I assure you that if any programmer will be able to implement all these questions without getting help from peers and Internet ,he/she will be a really good programmer in future.
GOOD LUCK. :) .....


Saturday, 20 December 2014

Quiz -- Computers Languages, Internet and World Wide Web

  1. The company that popularized personal computing was ____________.
  2. The computer that made personal computing legitimate in business and industry was the ____________.
  3. Computers process data under the control of sets of instructions called computer ____________.
  4. The six key logical units of the computer are the __________, __________, ___________, __________, __________ and the __________.
  5. The three types of computer languages are __________, __________ and ____________.
  6. The programs that translate high-level language programs into machine language are called ____________.
  7. C is widely known as the development language of the ____________ operating system.
  8. The ____________ language was developed by Writh for teaching structured programming.
  9. The Department of Defense developed the Ada language with a compatibility called ____________, which allows programmers to specify activities that can proceed in parallel.
  10. ____________ or labeling content, is another key part of the collaborative theme of Web 2.0.
  11. With Internet applications, the desktop evolves to the ____________.
  12. ____________ involves reworking code to make it clearer and easier to maintain while preserving its functionality.
  13. With ____________ development, individuals and companies contribute their efforts in developing, maintaining and evolving software in exchange for the right to use that software for their own purposes, typically at no change.
  14. ____________ are used to match specific character patterns in text. They can be used to validate data to ensure that it’s in a particular format, to replace parts of one string with another, or to split a string.
  15. C++ programs are normally typed into a computer using a(n) ____________ program.



Answer Key
(1) Apple (2) IBM Personal Computer (3) programs (4) input unit, output unit, memory unit, arithmetic and logic unit (ALU), central processing unit (CPU), secondary storage unit (5) machine languages, assembly languages, high-level languages (6) compilers (7) UNIX (8) Pascal (9) multitasking (10) Tagging (11) webtop (12) Refactoring (13) open source (14) Regular expressions (15) editor

Wednesday, 17 December 2014

Quiz -- C++ Data Types

1. How would you declare an integer called num and initialize it to 10?
A. double num = 10;
B. int num = 10;
C. int num == 10;
D. int num 10;

2. What is the correct way to write a comment in C++ ?
A. /this is comment/
B. \\this is a comment
C. //this is a comment
D. None of the above.

3. How would you declare a double called sum and initialize it to 15?
A. double add 15;
B. add double = 15;
C. double add 15
D. double add = 15;

4. What do double data types hold?
A. two integers
B. decimals
C. one integer
D. whole numbers

5. What is the correct way to print integer add to the screen?
A. cout<<add<<endl;
B. cout<<"add"<<endl;
C. cout add;
D. cout>>add>>endl;
 
6. Which is the correct way to declare multiple integers?
A. int sum; num; age;
B. int sum, int num, int age;
C. int sum, num, age;
D. All of the above.

7. What is the correct way to input in a double called sum?
A. cout>>sum;
B. cin<<"sum";
C. cin>>sum
D. cin>>sum;


8. What is wrong with "int long = 9200000?
A. Out of range value
B. Invalid data type
C. Invalid name for variable
D. All of the above

9. How much memory a character takes to store the value?
A. 1 byte
B. 4 bytes
C. 8 bytes
D. 16 bytes

10. How much memory an integer takes to store the value?
A. 1 byte
B. 4 bytes
C. 8 bytes
D. 16 bytes







   







ANSWER KEY

1. (B)   2. (C)   3. (D)   4. (B)   5. (A)   6. (C)   7. (D)   8. (C)   9. (A)   10. (B)

Thursday, 4 December 2014

Quiz -- C++ Basics

1. What is the correct value to return to the operating system upon the successful completion of a program?
A. -1
B. 1
C. 0
D. Programs do not return a value.

2. What is the only function all C++ programs must contain?
A. start()
B. system()
C. main()
D. program()

3. What punctuation is used to signal the beginning and end of code blocks?
A. { }
B. -> and <-
C. BEGIN and END
D. ( and )

4. What punctuation ends most lines of C++ code?
A. .
B. ;
C. :
D. '

5. Which of the following is a correct comment?
A. */ Comments */
B. ** Comment **
C. /* Comment */
D. { Comment }

6. Which of the following is not a correct variable type?
A. float
B. real
C. int
D. double

7. Which of the following is the correct operator to compare two variables?
A. :=
B. =
C. equal
D. ==


8. Which of the following statement is correct?
A. C++ enables to define functions that take constants as an argument.
B. We cannot change the argument of the function that that are declared as constant.
C. Both A and B.
D. We cannot use the constant while defining the function.

9. How much memory an integer, double, float and character takes to store the value?
A. 4 bytes, 8 bytes, 4 bytes and 1 byte
B. 4 bytes, 4 bytes, 8 bytes and 2 bytes
C. 2 bytes, 8 bytes, 8 bytes and 4 byte
D. 2 or 4 bytes, 8 bytes, 8 bytes and 1 byte


10. What will be the output?
   


#include<iostream>
using namespace std;
int main()
{
    int a;
    cout<<a;
    return 0;
}



A. Unidentified Integer Error
B. Compile Error
C. Run-time Error
D. Garbage Value



















ANSWER KEY

1. (C)   2. (C)   3. (A)   4. (B)   5. (C)   6. (B)   7. (D)   8. (C)   9. (A)   10. (D)

Twitter Delicious Facebook Digg Favorites More

 
Design by MA Technologies | Bloggerized by Computer Science Prevails