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.

The statement which prints the integer values 1 to 10 on the screen, is
12345678910

count = count + 1;
}
"/> A.    Statement 1
count = 1;
while( count <= 10 ) {
printf("%d", count);
count = count + 1;
}
Wrong Right

count = count + 1;
}
"/> B.    Statement 2
count = 1;
while( count <= 10 ) {
printf("%d", &count);
count = count + 1;
}
Wrong Right

count = count + 1;
}
"/> C.    Statement 3
count = 1;
while( count < 10 ) {
printf("%d\n", count);
count = count + 1;
}
Wrong Right

count = count + 1;
}
"/> D.     Statement 4
count = 1;
while( count <= 10 ) {
printf("%d\n", count);
count = count + 1;
}
Wrong Right

Answer : Statement 1
count = 1;
while( count <= 10 ) {
printf("%d", count);
count = count + 1;
}

Explanation : There is no explanation...

Learn more problems on : Loops

Discuss on this question

2.

What type is argv?

A.    char * Wrong Right

B.    int Wrong Right

C.    char ** Wrong Right

D.    It's not a variable Wrong Right

Answer : char **

Explanation : There is no explanation...

Learn more problems on : Command Line Arguments

Discuss on this question

3.

What is the output of following program?
void abc(int a, int b){
printf("%d%d",++a,++b);
}
void main(){
int a=10;
abc(++a,a++);
abc(a++,++a);
printf("%d",a);
}

A.    13 12 12 13 14 Wrong Right

B.    13 11 14 14 14 Wrong Right

C.    13 11 13 14 14 Wrong Right

D.    13 12 14 14 14 Wrong Right

Answer : 13 11 14 14 14

Explanation : There is no explanation...

Learn more problems on : Typecasting

Discuss on this question

4.

Which of the following shows the correct syntax for an if statement?

A.    if expression Wrong Right

B.    if { expression Wrong Right

C.    if ( expression ) Wrong Right

D.    expression if Wrong Right

Answer : if ( expression )

Explanation : There is no explanation...

Learn more problems on : If statements

Discuss on this question

5.

Which properly declares a variable of struct foo?

A.    struct foo; Wrong Right

B.     struct foo var; Wrong Right

C.    foo; Wrong Right

D.    int foo; Wrong Right

Answer : struct foo var;

Explanation : There is no explanation...

Learn more problems on : Structures

Discuss on this question

6.

The statement which declares a structure variable called sample, defined from a structure of typestruct record, is

A.    type sample : record; Wrong Right

B.    struct sample; Wrong Right

C.    struct record sample; Wrong Right

D.    declare sample as type record; Wrong Right

Answer : struct record sample;

Explanation : There is no explanation...

Learn more problems on : Structures

Discuss on this question

7.

The statement that correctly assigns the sum of the two variables loop_count and petrol_cost to the variable sum, is

A.    sum = loop_count + petrol_cost; Wrong Right

B.    loop_count = sum + petrol_cost; Wrong Right

C.    petrol_cost = sum - loop_count; Wrong Right

D.    sum = petrol_cost / loop_count; Wrong Right

Answer : sum = loop_count + petrol_cost;

Explanation : There is no explanation...

Learn more problems on : Assignments

Discuss on this question

8.

What is the output of the following code?
#include "stdio.h"
extern int a;
main(){
printf("\na=%d",a);
return 0;

A.    a=0 Wrong Right

B.    a=garbage value Wrong Right

C.    error Wrong Right

D.    none of these Wrong Right

Answer : error

Explanation : Linking undefined symbol.

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

Discuss on this question

9.

The statement that correctly defines an integer called sum is

A.    sum : integer; Wrong Right

B.    integer sum; Wrong Right

C.    int sum; () Wrong Right

D.    sum int; Wrong Right

Answer : int sum; ()

Explanation : There is no explanation...

Learn more problems on : Defining Variables

Discuss on this question

10.

What is the output of following program?
void main(){
int a=2;
switch(a);
{
case 1: printf("A");
case 2: printf("B");
case 3: printf("C");
break;
case 4: printf("D");
default: printf("E");
break;
}
}  

A.    A B C Wrong Right

B.    A B C E Wrong Right

C.    A B C D E Wrong Right

D.    error Wrong Right

Answer : error

Explanation : switch(a);
terminated by ; 

Learn more problems on : Switch-case

Discuss on this question

11.

How do you include a system header file called sysheader.h in a C source file?

A.    #include Wrong Right

B.    #incl "sysheader.h" Wrong Right

C.    #includefile Wrong Right

D.    #include sysheader.h Wrong Right

E.    #incl Wrong Right

Answer : #include

Explanation : There is no explanation...

Learn more problems on : File Handling

Discuss on this question

12.

What will be printed as the result of the operation below?
main()
{
int x=20,y=35;
x=y++ + x++;
y= ++y + ++x;
printf("%d%d",x,y);
}   

A.    5 8 9 4 Wrong Right

B.    5 7 9 4 Wrong Right

C.    5 8 9 5 Wrong Right

D.    5 7 8 4 Wrong Right

Answer : 5 7 9 4

Explanation : There is no explanation...

Learn more problems on : Operators

Discuss on this question

13.

What will be the output of following C code?
void main()
{
int *mptr, *cptr;
mptr = (int*)malloc(sizeof(int));
printf(ā€œ%dā€,*mptr);
int *cptr = (int*)calloc(sizeof(int),1);
printf(ā€œ%dā€,*cptr);
}

A.    1 Wrong Right

B.    Garbage-value 0 Wrong Right

C.    Error Wrong Right

D.    None of these Wrong Right

Answer : Garbage-value 0

Explanation : The memory space allocated by malloc is uninitialized, whereas calloc returns the allocated memory space initialized to zeros.

Learn more problems on : Inbuilt Functions

Discuss on this question

14.

Which is not a proper prototype?

A.    int funct(char x, char y); Wrong Right

B.    double funct(char x) Wrong Right

C.    void funct(); Wrong Right

D.    char x(); Wrong Right

Answer : double funct(char x)

Explanation : There is no explanation...

Learn more problems on : Functions

Discuss on this question

15.

Which of the following gives the memory address of integer variable a?

A.    *a; Wrong Right

B.    a; Wrong Right

C.    &a; Wrong Right

D.    address(a); Wrong Right

Answer : &a;

Explanation : There is no explanation...

Learn more problems on : Pointers

Discuss on this question

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