In HTML, ___________ tag is used to construct drop-down list boxes and scrolling list boxes.
Q.2.
Two main measures for the efficiency of an algorithm are
Time and Space
Complexity and Memory
Data and Space
Memory and Processor
Q.3.
What value does read() return when it has reached the end of a file?
1
-1
0
None
Q.4.
All variables in PHP start with which symbol?
%
!
$
&
Q.5.
SNOBOL is mainly used for
Text Operation
String operations
List operations
Numerical operations
Q.6.
A function cannot be defined inside another function
TRUE
FALSE
Q.7.
What is math.floor(3.6)?
6
3
3.5
0.6
Q.8.
We want to round off x, a Float to an Int value. The correct way to do so would be
Y = ( int ) ( x + 0.5 ) ;
Y = int ( x + 0.5) ;
Y = ( int ) x + 0.5;
Y = ( int ) ( ( int ) x + 0.5 )
Q.9.
In programming, repeating some statements is usually called ?
Running
Structure
Looping
Control structure
Q.10.
Methods declared as what cannot be overriden?
Transcient
Abstract
Final
Super
Q.11.
The output of the code below is
#include <stdio.h> void main() { int i = 0, k; if ( i == 0 ) goto label; for ( k = 0;k < 3; k++ ) { printf( "hin" ); label: k = printf( "%03d", i ); } }
0
hi hi hi 0 0 0
0 hi hi hi 0 0 0
0 0 0
Q.12.
What will be output of following program ?
#include int main()
{
int a = 10; void *p = &a; int *ptr = p; printf("%u",*ptr); return 0;
}
10
Address
2
Compilation error
Q.13.
What will output when you compile and run the following code?
#include <stdio.h> struct student {
int roll; int cgpa; int sgpa[8];
};
void main() {
struct student s = { 12,8,7,2,5,9 }; int *ptr; ptr = (int *)&s; clrscr(); printf( "%d", *(ptr+3) ); getch();
}
8
7
2
Compiler error
Q.14.
What will be output when you will execute following c code?
#include <stdio.h> void main()
{ switch(2)
{ case 1L:printf("No"); case 2L:printf("%s","I"); goto Love; case 3L:printf("Please"); case 4L:Love:printf("Hi"); } }
I
IPleaseHi
IHi
Compilation error
Q.15.
What would be the output of the following program ?
main()
{
const int x = 5;
int *ptrx;
ptrx = &x;
*ptr = 10;
printf ("%d", x);
}
5
10
Error
Garbage value
Q.16.
What will be output of following program?
#include <stdio.h> int main()
{ void (*p)(); int (*q)(); int (*r)(); p = clrscr; q = getch; r = puts; (*p)(); (*r)("www.sawaal.com"); (*q)(); return 0; }
NULL
www.sawaal.com
Compilation error
None of above
Q.17.
What is the output of this C code?
#include <stdio.h> void main() { int x = 97; char y = x; printf("%cn", y); }
a
97
Run time error
None
Q.18.
If the following program (myprog) is run from the command line as
myprog 1 2 3
what would be the output?
main(int argc, char *argv[])
{
int i, j = 0;
for (i = 0; i < argc ; i++)
j = j + atoi ( argv[i]);
printf ("%d", j);
}
123
6
Error
"123"
Q.19.
Which of the following is true?
It is appropriate to use assertions to validate arguments to methods marked public
It is appropriate to catch and handle assertion errors
It is NOT appropriate to use assertions to validate command-line arguments
None
Q.20.
public abstract interface Frobnicate { public void twiddle(String s); }
Which is a correct class?
public abstract class Frob implements Frobnicate { public abstract void twiddle(String s) { } }
public abstract class Frob implements Frobnicate { }
public class Frob extends Frobnicate { public void twiddle(Integer i) { } }
public class Frob implements Frobnicate { public void twiddle(Integer i) { } }
Support mcqgeeks.com by disabling your adblocker.
Please disable the adBlock and continue. Thank you.