Thursday, 9 May 2013

QUIZ ANSWERS 11-15

QUIZ ANSWERS 11-15

11.
A function that returns no values to the program that calls it is _____
not allowed in C++
type void
type empty
type barren
Answer: Option B


12. 
The keyword used to define a structure is _____
Stru
stt
Struct
structure
Answer: Option C

13. 
Which of the following statements is false?
A function is a block of code that performs a specific task
Functions allow programmers to break large and complex problems into small and manageable tasks
Functions allow programmers to use existing code to perform common tasks
Functions can be called, or invoked, only once in a program
Programmer-defined functions can be either value-returning or void
Answer: Option D

14. 
Header files often have the file extension _____
.H
.HE
.HEA
.HEAD
Answer: Option A

15. 
The #ifndef directive tests to see whether ________
a class has been defined
a variable has been given a value
a class has no variable definitions
any objects of the class have been instantiated
Answer: Option A

#ifndef checks whether the given token has been #defined earlier in the file or in an included file; if not, it includes the code between it and the closing #else or, if no #else is present, #endif statement#ifndef is often used to make header files idempotent by defining a token once the file has been included and checking that the token was not set at the top of that file.

Sorting a given list of numbers in ascending order.


Sorting a given list of numbers in ascending order.

#include<iostream.h>
#include<conio.h>

void main()
{
clrscr();
int x[20],n;

cout<<"How many Numbers you want to enter:";
cin>>n;

cout<<"\nEnter Values:";
for(int i=0;i<n;i++)
cin>>x[i];

int temp;
for(int i=0;i<n-1;i++) // for controling passes
{
for(int j=0;j<n-1;j++) // for making comparisons
{
if(x[j]>x[j+1])
{
temp=x[j];
x[j]=x[j+1];
x[j+1]=temp;
}
}
}
cout<<"\nSorted Elements in ascending order:\n";

for(int k=0;k<n;k++) // for printing numbers
cout<<x[k]<<"\t";

getch();
}


Wednesday, 8 May 2013

QUIZ ANSWERS 6-10

QUIZ ANSWERS 6-10
6.
Some Streams work with input, and some with output
True
False
Answer: Option A

7. 
If you design a class that needs special initialization tasks, you will want to design a(n) _____
housekeeping routine
Initializer
Constructor
Compiler
Answer: Option C

8. 
Which type of statement does not occur in computer programs?
Sequence
loop
Denial
selection
Answer: Option C

9. 
The newline character is always included between
pair of parentheses
pair of curly braces
control string
&
None of the above
Answer: Option C



10. 
To be called object-oriented, a programming language must allow
functions that return only a single value
#include files
Inheritance
All of the above
Answer: Option C

QUIZ ANSWERS: 1 to 5


QUIZ ANSWERS: 1 to 5

1. To expose a data member to the program, you must declare the data member in the _____ section of the class
common
exposed
public
unrestricted
user
Answer: Option C

2. 
Evaluate the following expression: 3 >6&&7>4
True
False
Answer: Option B

3. 
A function that changes the state of the cout object is called a(n) _____
Member
adjuster
Manipulator
operator
Answer: Option C

4. 
A C++ program contains a function with the header int function(double d, char c)Which of the following function headers could be used within the same program?
char function(double d, char c)
int function(int d, char c)
both (a) and (b)
neither (a) nor (b)
Answer: Option B

5. 
When the compiler cannot differentiate between two overloaded constructors, they are called
Overloaded
destructed
Ambiguous
dubious
Answer: Option C


Monday, 6 May 2013

INTERNET ERROR CODES !!

INTERNET ERROR CODES !!

Error 400 - Bad request.
Error 401 - unauthorized request.
Error 403 - forbidden.
Error 404 - Not found.
Error 500 -Internal error.
Error 501 - Not Implemented
Error 502 - Bad Gateway
Error 503 -Service unavailable.
Error 504 - Gateway Time-Out
Error 505 - HTTP Version not supported/DNS Look up Fail/ unknown host
Error 500-599 - Server Errors.