C language/The ABC of C Sample Test,Sample questions

Question:
A character variable can at a time store _ character(s):-

1.two

2.Infinite

3.three

4.one

Posted Date:-2019-03-25 04:40:41


Question:
Binary equivalent of 762 is :-

1.1001111010

2.100000101

3.1011111010

4.1101111011

Posted Date:-2019-03-25 04:37:24


Question:
Binary representation of 345 is :-

1.101010001

2.110011001

3.1011111001

4.101011001

Posted Date:-2019-03-26 06:17:30


Question:
Binary representation of 371(octal) is :-

1.11111001

2.11110010

3.11110011

4.10111011

Posted Date:-2019-03-26 06:46:18


Question:
Binary representation of F9 is :-

1.11111001

2.11100110

3.11001001

4.11100110

Posted Date:-2019-03-26 06:43:49


Question:
C variables are case 

1.insensitive

2.Sensitive

3.Both of the above

4.None of the above

Posted Date:-2019-03-25 04:35:24


Question:
Decimal representation of 101010001 is :-

1.317

2.345

3.337

4.None of the above

Posted Date:-2019-03-26 06:21:17


Question:
Decimal representation of 101011001 is :-

1.347

2.276

3.325

4.345

Posted Date:-2019-03-26 06:18:23


Question:
Decimal representation of 110011001 is :-

1.317

2.409

3.512

4.None of the above

Posted Date:-2019-03-26 06:23:28


Question:
Decimal representation of 11111001 is :-

1.249

2.261

3.256

4.None of the above

Posted Date:-2019-03-26 06:37:58


Question:
Decimal representation of 11111111 is :-

1.256

2.257

3.255

4.None of the above

Posted Date:-2019-03-26 06:38:44


Question:
Hexadecimal representation of 11111001 is :-

1.E9

2.99

3.F9

4.159

Posted Date:-2019-03-26 06:42:47


Question:
int a,b=6;  a=++b + b++; value of a ?

1.14

2.15

3.12

4.0

Posted Date:-2019-03-25 04:45:19


Question:
Octal equivalent of 762 is:-

1.1372

2.1371

3.7132

4.7312

Posted Date:-2019-03-25 04:38:19


Question:
Octal representation of 11111001 is :-

1.79

2.371

3.234

4.None of the above

Posted Date:-2019-03-26 06:41:32


Question:
Point out which of the following variables names are valid:

1.variable_salary

2.var.

3.variable name

4.variable-sal

Posted Date:-2019-03-25 04:33:24


Question:
What will be the output of the following program,consider 10 as a input:-

int main()
{
scanf("%d",&n);
printf("%d",n);
return 0;
}

1.10

2.4

3.Error:undefined Symbol n

4.None of the above

Posted Date:-2019-03-26 06:00:41


Question:
What will be the output of the following program:

 #include 
int main() 
{
 printf("%d,",4%3);
 printf("%d,",4%-3);
 printf("%d,",-4%3);
 printf("%d",-4%-3); 
return 0; 
}

1.1,1,1,1

2.1,1,-1,-1

3.compiler error

4.runtime error

Posted Date:-2019-03-25 05:56:18


Question:
What will be the output of the following program:

#include
int main()
{
int a,b;
a=-3- -3;
b=-3- -(-3);
printf("%d,%d",a,b);
}

1.Runtime error

2.Compiler error

3.0,6

4.0,-6

Posted Date:-2019-03-25 05:39:54


Question:
What will be the output of the following program:

#include
int main()
{
int a;
a=-3*-4%-6/-5;
printf("%d",a);
return 0;
}

1.0

2.10

3.5

4.7

Posted Date:-2019-03-25 05:49:06


Question:
What will be the output of the following program:

#include
int main()
{
int a;
a=-3+4-7*8/5%10;
printf("%d",a);
}

1.6

2.10

3.7

4.0

Posted Date:-2019-03-25 05:46:29


Question:
What will be the output of the following program:

#include
int main()
{
int a;
a=3*4%5;
printf("%d",a);
}

1.12

2.2

3.0

4.None of the above

Posted Date:-2019-03-25 05:41:20


Question:
What will be the output of the following program:

#include
int main()
{
int a;
a=4%5+6%5;
printf("%d",a);
return 0;
}

1.0

2.5

3.1

4.None of the above

Posted Date:-2019-03-25 05:48:12


Question:
What will be the output of the following program:

#include
int main()
{
printf("%d,",4/3);
printf("%d,",4/-3);
printf("%d,",-4/3);
printf("%d",-4/-3);
return 0;
}

1.Compiler error

2.Runtime error

3.1,-1,-1,1

4.1,1,1,1

Posted Date:-2019-03-25 05:51:51


Question:
What will be the output of the following program:

int main()
{
float a=5,b=2;
int c;
c=a%b;
printf("%d",c);
return 0;
}

1.1

2.2

3.error

4.None of the above

Posted Date:-2019-03-25 06:35:00


Question:
What will be the output of the following program:

int main()
{
float a=5.b=2;
int c;
c=300000*300000/300000;
printf("%d",c);
return 0;
}

1.-657

2.657

3.-647

4.647

Posted Date:-2019-03-25 06:40:34


Question:
What will be the output of the following program:

int main()
{
int c;
c= 3 ** 4 - 7 ^ 8;
printf("%d",c);
return 0;
}

1.Error

2.18

3.2

4.4

Posted Date:-2019-03-25 06:37:39


Question:
What will be the output of the following program:#includeint main(){int a;a=3+4-7*8/5%10;printf(

1.6

2.10

3.7

4.0

Posted Date:-2019-03-25 05:43:53


Question:
What will be the output of the following program:-

int main()
{
float a;
a=4/2;
printf("%f,%f",a,4/2);
return 0;
}

1.2,2

2.2.000000,2.000000

3.2.0,2.0

4.2.000000,0.000000

Posted Date:-2019-03-26 05:40:12


Question:
What will be the output of the following program:-

int main()
{
float a=1.5;
int b=3;
a=b/2+b*8/b-b+a/3;
printf("%d",a);
return 0;
}

1.6.5

2.6

3.6.500000

4.0

Posted Date:-2019-03-26 05:33:02


Question:
What will be the output of the following program:-

int main()
{
int a,b;
a=5.999999;
b=5.000001;
printf("%d,%d",a,b);
return 0;
}

1.5.999999,5.000001

2.5,5

3.0,0

4.None of the above

Posted Date:-2019-03-26 05:37:56


Question:
What will be the output of the following program:-

int main()
{
int a=5,x;
x=++a + a++ - ++a;
printf("%d",a);
return 0;
}

1.7

2.5

3.8

4.6

Posted Date:-2019-03-26 06:03:52


Question:
What will be the output of the following program:-

int main()
{
int i=3,a=4,n;
float t=4.2;
n=a * a / i + i / 2 * t + 2 +t;
printf("%d",n)
return 0;
}

1.15

2.15.0

3.15.000000

4.0

Posted Date:-2019-03-26 05:36:11


Question:
What will be the output of the following program:-

int main()
{
printf("%d",sizeof(4)/sizeof(2.0));
return 0;
}

1.1

2.0

3.2

4.error

Posted Date:-2019-03-26 05:56:15


Question:
What will be the output of the following program:-

int main()
{
printf("%d",sizeof(4.0)/sizeof(4));
return 0;
}

1.0

2.1

3.2

4.Error

Posted Date:-2019-03-26 05:56:52


Question:
What will be the output of the following program:-

int main()
{
printf("%d,%f",4,4);
return 0;
}

1.4,4

2.4,4.000000

3.4,0.000000

4.error

Posted Date:-2019-03-26 05:43:50


Question:
What will be the output of the following program:-

int main()
{
printf("%d,%f",4.0,4.0);
return 0;
}

1.4,0.000000

2.4,4

3.4,4.000000

4.4.0,4.0

Posted Date:-2019-03-26 05:45:29


Question:
What will be the output of the following program:- 

int main()
{
int a=5,x; 
x=++a + a++ - ++a; 
x++;
a=a + ++x;
printf("%d",a); 
return 0;
 }

1.17

2.5

3.12

4.13

Posted Date:-2019-03-26 06:06:19


Question:
What will be the output of the following program:- 

int main() 
{ 
int a=5,x; 
x=++a * a++;
printf("%d,%d",x,a); 
return 0; 
}

1.36,7

2.25,7

3.25,6

4.25,5

Posted Date:-2019-03-26 06:10:08


Question:
What will be the output of the following program:- int main() { int a=5,x; x=++a + a++ + ++a; printf("%d,%d",x,a);}

1.15,5

2.15,8

3.18,7

4.21,8

Posted Date:-2019-03-26 06:08:01


Question:
What will be the output of the following programs:-

#include
int main()
{
char ch;
printf("%d",sizeof(ch));
}

1.2

2.3

3.1

4.4

Posted Date:-2019-03-25 04:54:27


Question:
What will be the output of the following programs:-

#include
int main()
{
char ch=291;
printf("%d,%c",ch,ch);
}

1.291,ch

2.291,#

3.35,#

4.291,291

Posted Date:-2019-03-25 05:05:31


Question:
What will be the output of the following programs:-

#include
int main()
{
float f;
printf("%d",sizeof(f));
}

1.Compiler error

2.Ascii value of f

3.4

4.1

Posted Date:-2019-03-25 04:56:46


Question:
What will be the output of the following programs:-

#include
int main()
{
float f=2.0;
printf("%d,%d",sizeof(f),sizeof(2.0));
}

1.4,4

2.4,8

3.8,8

4.8,4

Posted Date:-2019-03-25 05:03:13


Question:
What will be the output of the following programs:-

#include
int main()
{
int i;
printf("%d",sizeof(i));
}

1.Compiler error

2.Ascii value of i

3.1

4.4

Posted Date:-2019-03-25 04:56:09


Question:
What will be the output of the following programs:-

#include
int main()
{
printf("%d",sizeof(2));
}

1.1

2.2

3.4

4.Compiler error

Posted Date:-2019-03-25 05:00:58


Question:
What will be the output of the following programs:-

#include
int main()
{
printf("%d",sizeof(2.0));
}

1.4

2.2

3.1

4.Compiler error

Posted Date:-2019-03-25 05:02:07


Question:
What will be the output of the following programs:-

#include
int main()
{
printf("%d",sizeof(char));
printf("%d",sizeof(int));
printf("%d",sizeof(float));
}

1.Compiler error

2.144

3.111

4.1

Posted Date:-2019-03-25 04:59:02


Question:
What will be the output of the following programs:-

#include
int main()
{
printf("%d",sizeof(char));
printf("%d",sizeof(int));
printf("%d",sizeof(float));
}

1.Compiler error

2.144

3.111

4.1

Posted Date:-2019-03-25 05:00:15


Question:
What will be the output of the following programs:-

#include
int main()
{
printf("%d,%o,%x",72,72,72);
}

1.72,110,48

2.72,72,72

3.72,58,114

4.72,48,144

Posted Date:-2019-03-25 04:48:13


More MCQS

  1. The ABC of C
  2. Interview question in c
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!