Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
2Activity
0 of .
Results for:
No results containing your search query
P. 1
Quiz for C

Quiz for C

Ratings: (0)|Views: 18|Likes:
Published by Abdul Hasib Shikder

More info:

Published by: Abdul Hasib Shikder on Dec 26, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

07/11/2011

pdf

text

original

 
Quiz for C++ Tutorial1. What function initalizes variables in a class:ConstructorDestructorConstitutorA and B are correct.2. To include code from the library in the program, such as iostream, a directive wouldbe called up using this command.#include <>; with iostream.h inside the bracketsinclude (iostreamh)#include <> with iostream.h inside the bracketsinclude #iostream,h;3. Single line comments explaining code would be preceded like in the followingexample /** // *//  /*4. Which line has all reserved words ?char, int, float, doubled, short, long, unsigned, signedsizeof, const, typedef, static, voided, enum, struct, unionif, else, for, while do, switch, continue, break defaulted, goto, return, extern, private, public, protected5. What punctuation must each command line have at the end of the line ?
Generated by Foxit PDF Creator © Foxit Softwarehttp://www.foxitsoftware.com For evaluation only.
 
:,!;6. The C++ language iscase-sensitive.Not case-sensitive.It dependsNone of these7. The number 5.9875e17 must be stored in a(n):intlongdoublefloat8. Select the correct definition for a string variable.string mystr;string mystr[20];string[20] mystr;char mystr[20];9. The sentence "Hello world!" uses _____ elements in a character array.10111213
Generated by Foxit PDF Creator © Foxit Softwarehttp://www.foxitsoftware.com For evaluation only.
 
10. When you are creating a structure, you need to use the following keywordstructurestructobjectrecord11. Select the correct function definition (NOT prototype) from the list below.void intro();double sin(double rad);int foo(int bar; double baz)double pow(double num, int pow);12. Cout can print multiple values or variables in a single command using the followingsyntax:cout << "Hi" + bob + "\n";cout << "Hi" << bob << "\n";cout << "Hi", bob, "\n";cout << ("Hi" & bob & "\n");13. Write a for loop that counts from 0 to 5.for (c = 0; c <= 5; c++)for (int c = 0; c <= 6; c++)for (c = 0; c < 5; c++)for (c = 0; c < 5; c++);14. What does the statement #include do ?It defines the function iostream.hIt tells the compiler where the program beginsIt defines the words TRUE and FALSE
Generated by Foxit PDF Creator © Foxit Softwarehttp://www.foxitsoftware.com For evaluation only.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->