General Knowledge :: Testing sawaal
-
main()
{
char *p; p = "Hello";
printf ("%cn", *&*p);
}
-
What is the output of this C code?
#include <stdio.h>
int main()
{
int a = 1, b = 1;
switch (a)
{
case a*b:
printf("yes ");
case a-b:
printf("non");
break;
}
} -
main()
{
char s[ ] = "man";
int i;
for( i=0; s[ i ]; i++)
printf( "n%c%c%c%c", s[ i ], *(s+i), *(i+s), i[s] );
}
-
What will be output when you will execute following c code?
#include <stdio.h>
void main(){
signed int a = -1;
unsigned int b = -1u;
if(a == b)
printf( "The Lord of the Rings" );
else
printf( "American Beauty" );
} -
enum colors {BLACK,BLUE,GREEN}
main()
{
printf( "%d..%d..%d", BLACK, BLUE, GREEN );
return(1);
}
-
public abstract interface Frobnicate { public void twiddle(String s); }
Which is a correct class?
-
How many times i value is checked in the below code?
#include <stdio.h>
int main()
{
int i = 0;
do {
i++;
printf( "In while loopn" );
} while (i < 3);
} -
Output of the Program :
main()
{
int i = 1;
while (i <= 5)
{
printf( "%d", i );
if (i > 2) goto here;
i++;
}
}
fun()
{
here : printf( "PP" );
}
-
What is the output of this C code?
#include <stdio.h>
void main()
{
int x = 1, z = 3;
int y = x << 3;
printf( "%dn", y );
}
A.
public abstract class Frob implements Frobnicate { public abstract void twiddle(String s) { } }
|
B.
public abstract class Frob implements Frobnicate { }
|
C.
public class Frob extends Frobnicate { public void twiddle(Integer i) { } }
|
D.
public class Frob implements Frobnicate { public void twiddle(Integer i) { } }
|