Guest | Sign in | Register

Sign in to LucentBlackBoard

E-mail Id
Password
Loading...

New Member to LucentBlackBoard?

Forgot Your Password?

Enter your registered e-mail address, your password will be sent to e-mail address.
Enter E-mail Id
Loading...

Time left :





Note:

1. Total number of questions : 15.

2. Time alloted : 20 minutes.

3. Each question carry 1 mark, no negative marks.

4. Click the 'Submit Test' button given in the bottom of this page to Submit your answers.

5. Test will be submitted automatically if the time expired.

6. Don't refresh the page.

Result and Statistics

Time Left :

Result and Statistics ( Test No : online_test_number )

A. Number Of Question

15

B. Number Of Attempted

-

C. Number Of Correct Answer

-

D. Number Of Wrong Answer ( D = B-C )

-

E. Total Score ( E = C )

-

F. Accuracy Rate ( F = C / B * 100 )

-

G. Total Percentage ( G = C / A * 100 )

-



1.

What is the final value of x when the code int x; for(x=0; x<10; x++) {} is run?

A.    10 Wrong Right

B.    9 Wrong Right

C.    0 Wrong Right

D.    1 Wrong Right

Answer : 10

Explanation : There is no explanation...

Learn more problems on : Loops

Discuss on this question

2.

Use a printf statement to print out the contents of the character array called words

A.    printf("%s\n", words); Wrong Right

B.    printf("%c\n", words); Wrong Right

C.    printf("%d\n", words); Wrong Right

D.    printf("%s\n", words[2]); Wrong Right

Answer : printf("%s\n", words);

Explanation : There is no explanation...

Learn more problems on : Arrays

Discuss on this question

3.

Which header file do you need to include to use typecasting? 

A.    stdin.h Wrong Right

B.    ctype.h Wrong Right

C.    math.h Wrong Right

D.    None Wrong Right

Answer : None

Explanation : There is no explanation...

Learn more problems on : Typecasting

Discuss on this question

4.

What is the output of this program?
main()
{
struct
{
int i;
}xyz;
(*xyz)->i=10;
printf("%d",xyz.i);
}

A.    program will not compile Wrong Right

B.    10 Wrong Right

C.    god only knows Wrong Right

D.    address of I Wrong Right

Answer : 10

Explanation : There is no explanation...

Learn more problems on : Structures

Discuss on this question

5.

What is the output of following program?
void main(){
float a;
a=6.7;
if(a==6.7)
printf("A");
else
printf("B");
}

A.    A Wrong Right

B.    B Wrong Right

C.    error Wrong Right

D.    nothing display on screen Wrong Right

Answer : B

Explanation : There is no explanation...

Learn more problems on : If statements

Discuss on this question

6.

The statement which prints out the value of the integer variable sum, is


"/> A.    printf("%s", sum);

Wrong Right

B.    print("%i", sum); Wrong Right

C.    printf("%d", sum); Wrong Right

D.    printf("%d", &sum); Wrong Right

Answer : printf("%d", sum);

Explanation : There is no explanation...

Learn more problems on : printf() and scanf()

Discuss on this question

7.

Which one Keyword used to calling function back again and again?

A.    switch Wrong Right

B.    goto Wrong Right

C.    go back Wrong Right

D.    return Wrong Right

Answer : return

Explanation : There is no explanation...

Learn more problems on : C Basics

Discuss on this question

8.

Declare a pointer to a structure of type date called dates.

A.    struct dates dates; Wrong Right

B.    struct *date *dates; Wrong Right

C.    struct dates date; Wrong Right

D.    struct date *dates; Wrong Right

Answer : struct date *dates;

Explanation : There is no explanation...

Learn more problems on : Pointers & Structures

Discuss on this question

9.

What is the output of following C code?
#define a 10
main()
{
#define a 50
printf("%d",a);
}

A.    50 Wrong Right

B.    10 Wrong Right

C.    15 Wrong Right

D.    Error Wrong Right

Answer : 50

Explanation : The preprocessor directives can be redefined anywhere in the program. So the most recently assigned value will be taken.

Learn more problems on : Preprocessor Directives

Discuss on this question

10.

What will be the output of the following program?
#include
void main()
{ int a = 2;
switch(a)
{ case 1:
printf("goodbye"); break;
case 2:
continue;
case 3:
printf("bye");
}
}

A.    error Wrong Right

B.    goodbye Wrong Right

C.    bye Wrong Right

D.    byegoodbye Wrong Right

Answer : error

Explanation : There is no explanation...

Learn more problems on : Switch-case

Discuss on this question

11.

Which one of the following statements will properly initialize the variable t with the current time from the sample above?

A.    t = clock(); Wrong Right

B.    time( &t ); Wrong Right

C.    t = ctime(); Wrong Right

D.    t = localtime(); Wrong Right

E.    None of the above Wrong Right

Answer : t = clock();

Explanation : There is no explanation...

Learn more problems on : Defining Variables

Discuss on this question

12.

What will the output of following C code?
main()
{
int i=5;
printf("%d%d%d%d%d%d",i++,i--,++i,--i,i);
}

A.    45545 Wrong Right

B.    45540 Wrong Right

C.    44545 Wrong Right

D.    55545 Wrong Right

Answer : 45545

Explanation : The arguments in a function call are pushed into the stack from left to right. The evaluation is by popping out from the stack and the evaluation is from right to left, hence the result.

Learn more problems on : Operators

Discuss on this question

13.

string constants should be enclosed with?

A.    single quotes Wrong Right

B.    double quotes Wrong Right

C.    brackets Wrong Right

D.    None of these Wrong Right

Answer : double quotes

Explanation : There is no explanation...

Learn more problems on : Inbuilt Functions

Discuss on this question

14.

Predict the output or error(s) for the following?


void main()
{
int const * p=5;
printf("%d",++(*p));
}

A.    Compiler error Wrong Right

B.    5 Wrong Right

C.    6 Wrong Right

D.    7 Wrong Right

Answer : Compiler error

Explanation : Compiler error: Cannot modify a constant value.

p is a pointer to a "constant integer".

Learn more problems on : Pointers

Discuss on this question

15.

What is the output of the following program?
void fun(auto int _){
print("%d",_);
}
main(){
fun(23);
return 0;
}

A.    0 Wrong Right

B.    garbage Wrong Right

C.    error Wrong Right

D.    23 Wrong Right

Answer : error

Explanation : There is no explanation...

Learn more problems on : Functions

Discuss on this question

Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved © 2012-2015 SoftLucent.