C/C /C%20MCQS:-The%20ABC%20of%20C 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:-2021-06-24 08:32:48


Question:
Binary equivalent of 762 is :-

1.1001111010

2.100000101

3.1011111010

4.1101111011

Posted Date:-2021-06-24 08:32:48


Question:
Binary representation of 345 is :-

1.101010001

2.110011001

3.1011111001

4.101011001

Posted Date:-2021-06-24 08:32:48


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

1.11111001

2.11110010

3.11110011

4.10111011

Posted Date:-2021-06-24 08:32:48


Question:
Binary representation of F9 is :-

1.11111001

2.11100110

3.11001001

4.11100110

Posted Date:-2021-06-24 08:32:48


Question:
C variables are case 

1.insensitive

2.Sensitive

3.Both of the above

4.None of the above

Posted Date:-2021-06-24 08:32:48


Question:
Decimal representation of 101010001 is :-

1.317

2.345

3.337

4.None of the above

Posted Date:-2021-06-24 08:32:48


Question:
Decimal representation of 101011001 is :-

1.347

2.276

3.325

4.345

Posted Date:-2021-06-24 08:32:48


Question:
Decimal representation of 110011001 is :-

1.317

2.409

3.512

4.None of the above

Posted Date:-2021-06-24 08:32:48


Question:
Decimal representation of 11111001 is :-

1.249

2.261

3.256

4.None of the above

Posted Date:-2021-06-24 08:32:48


Question:
Decimal representation of 11111111 is :-

1.256

2.257

3.255

4.None of the above

Posted Date:-2021-06-24 08:32:48


Question:
Hexadecimal representation of 11111001 is :-

1.E9

2.99

3.F9

4.159

Posted Date:-2021-06-24 08:32:48


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

1.14

2.15

3.12

4.0

Posted Date:-2021-06-24 08:32:48


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

1.variable_salary

2.var.

3.variable name

4.variable-sal

Posted Date:-2021-06-24 08:32:48


Question:
Octal equivalent of 762 is:-

1.1372

2.1371

3.7132

4.7312

Posted Date:-2021-06-24 08:32:48


Question:
Octal representation of 11111001 is :-

1.79

2.371

3.234

4.None of the above

Posted Date:-2021-06-24 08:32:48


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:-2021-06-24 08:32:48


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

 #include<stdio.h> 
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:-2021-06-24 08:32:48


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

#include<stdio.h>
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:-2021-06-24 08:32:48


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

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

1.0

2.10

3.5

4.7

Posted Date:-2021-06-24 08:32:48


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

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

1.6

2.10

3.7

4.0

Posted Date:-2021-06-24 08:32:48


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

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

1.12

2.2

3.0

4.None of the above

Posted Date:-2021-06-24 08:32:48


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

#include<stdio.h>
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:-2021-06-24 08:32:48


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

#include<stdio.h>
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:-2021-06-24 08:32:48


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:-2021-06-24 08:32:48


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:-2021-06-24 08:32:48


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:-2021-06-24 08:32:48


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

1.6

2.10

3.7

4.0

Posted Date:-2021-06-24 08:32:48


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:-2021-06-24 08:32:48


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.5

4.0

Posted Date:-2021-06-24 08:32:48


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:-2021-06-24 08:32:48


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:-2021-06-24 08:32:48


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

3.15

4.0

Posted Date:-2021-06-24 08:32:48


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:-2021-06-24 08:32:48


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:-2021-06-24 08:32:48


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:-2021-06-24 08:32:48


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:-2021-06-24 08:32:48


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:-2021-06-24 08:32:48


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:-2021-06-24 08:32:48


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:-2021-06-24 08:32:48


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

#include<stdio.h>
int main()
{
char ch;
printf("%d",sizeof(ch));
}

1.2

2.3

3.1

4.4

Posted Date:-2021-06-24 08:32:48


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

#include<stdio.h>
int main()
{
char ch=291;
printf("%d,%c",ch,ch);
}

1.291,ch

2.291,#

3.35,#

4.291,291

Posted Date:-2021-06-24 08:32:48


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

#include<stdio.h>
int main()
{
float f;
printf("%d",sizeof(f));
}

1.Compiler error

2.Ascii value of f

3.4

4.1

Posted Date:-2021-06-24 08:32:48


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

#include<stdio.h>
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:-2021-06-24 08:32:48


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

#include<stdio.h>
int main()
{
int i;
printf("%d",sizeof(i));
}

1.Compiler error

2.Ascii value of i

3.1

4.4

Posted Date:-2021-06-24 08:32:48


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

#include<stdio.h>
int main()
{
printf("%d",sizeof(2));
}

1.1

2.2

3.4

4.Compiler error

Posted Date:-2021-06-24 08:32:48


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

#include<stdio.h>
int main()
{
printf("%d",sizeof(2.0));
}

1.4

2.2

3.1

4.Compiler error

Posted Date:-2021-06-24 08:32:48


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

#include<stdio.h>
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:-2021-06-24 08:32:48


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

#include<stdio.h>
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:-2021-06-24 08:32:48


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

#include<stdio.h>
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:-2021-06-24 08:32:48


More MCQS

  1. C++ Programming MCQS Set-1
  2. C++ Multiple Choice Questions Set-1
  3. C++ Multiple Choice Questions Set-2
  4. C++ Programming MCQS Set-2
  5. C++ Programming MCQS Set-3
  6. C++ Programming MCQS Set-4
  7. C++ (CPP) MCQ Question with Answer
  8. Advanced c++ multiple choice question(MCQS)
  9. OOPS Quiz Questions and Answers(MCQS)
  10. C Programming - MCQ Questions Set 1
  11. C Programming - MCQ Questions Set 2
  12. C Programming - MCQ Questions Set 3
  13. C Programming - MCQ Questions Set 4
  14. C Programming - MCQ Questions Set 5
  15. C++ programming language MCQ Questions Set 1
  16. C++ programming language MCQ Questions Set 2
  17. C++ programming language MCQ Questions Set 3
  18. C++ programming language MCQ Questions Set 4
  19. C++ programming language MCQ Questions Set 5
  20. C++ Programming -Constructors and Destructors
  21. C++ Programming -OOPS Concepts
  22. C++ Programming - References
  23. C++ Programming - Functions
  24. C MCQS:-The ABC of C
  25. C MCQS Interview Questions
  26. C++ Questions and Answers OOPs Basic Concepts
  27. C++ Questions and Answers Returning Objects
  28. C Programming MCQ Part 1
  29. C Programming MCQ
  30. Computer Science & Engineering C Multiple Choice Questions set 1
  31. Computer Science & Engineering C Multiple Choice Questions set 2
  32. C Multiple Choice Questions C Functions Set 1
  33. C Multiple Choice Questions C Functions Set 2
  34. C Multiple Choice Questions C Operators
  35. C Multiple Choice Questions & AnswersConditional Expressions
  36. C Multiple Choice Questions & Answers Data Types
  37. C Multiple Choice Questions & Answers File Access
  38. Computer Science & Engineering Cloud Computing MCQs Part 1
  39. CPP Programming MCQ Set 1
  40. CPP Programming MCQ Set 2
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!