Aptitude Reasoning English GK Computer Knowledge Programming Skill Banking Software Testing



Question - 1

C language was invented in which laboratories.?

  • Uniliver Labs
  • AT&T Bell Labs
  • R&C Labs
  • Verizon Labs
Solutions
Question - 2

C Language is a successor to which language.?

  • FORTRAN
  • B language
  • BASIC
  • D language
Solutions
Question - 3

int main()
{
    enum value{VAL1=0, VAL2, VAL3, VAL4, VAL5} var;
    printf("%d\n", sizeof(var));
    return 0;
}

  • 2
  • 4
  • 5
  • 6
Solutions
Question - 4

typedef struct data mystruct;
struct data
{
    int x;
    mystruct *b;
};

  • Error: in structure declaration
  • Linker Error
  • No Error
  • None of above
Solutions
Question - 5

What would be the output for this C program?

int main()
{
int y = 1, x = 0;
int l = (y++, x++) ? y : x;
printf("%d\n", l);
}

  • Compile time error
  • 1
  • 0
  • None Of the above
Solutions
Question - 6

C is _______ type of programming language.?

  • Bit level language
  • Procedural
  • Object Oriented
  • Functional
Solutions
Question - 7

int a = 20;
int main()
{
int a = 10;
printf("%d", a);
return 0;
}

  • 1
  • 10
  • 0
  • Ambiguity Error
Solutions
Question - 8

Which of the following is allowed in a C Arithmetic instruction?

  • {}
  • []
  • ()
  • None of these above
Solutions
Question - 9

C programs are converted into machine language with the help of

  • An Editor
  • A Compiler
  • An Operating System
  • None of these
Solutions
Question - 10

int main()
{
int __a = 10;
printf("%d",__a);
return 0;
}

  • Compilation Error
  • 10
  • _10
  • _a
Solutions
Question - 11

What is a lint?

  • C compiler
  • Interactive debugger
  • Analyzing tool
  • C interpreter
Solutions
Question - 12

main()  
{  
  int a = 1, b = 2, c = 3:  
  printf("%d", a + = (a + = 3, 5, a))  
}  

  • 6
  • 8
  • 10
  • 12
Solutions
Question - 13

What does this declaration mean?

int x : 4;  

  • X is a four-digit integer.
  • X cannot be greater than a four-digit integer.
  • X is a four-bit integer.
  • None of the these
Solutions
Question - 14

Why is a macro used in place of a function?

  • It reduces execution time.
  • It reduces code size.
  • It increases execution time.
  • It increases code size.
Solutions
Question - 15

In the C language, the constant is defined _______.

  • Before main
  • After main
  • Anywhere, but starting on a new line.
  • None of the these.
Solutions
Question - 16

Which one of the following is a loop construct that will always be executed once?

  • for
  • while
  • switch
  • do while
Solutions
Question - 17

How many characters can a string hold when declared as follows?

char name[10]: 

  • 10
  • 11
  • name
  • None of these
Solutions
Question - 18

How many bytes does "int = D" use?

  • 0
  • 1
  • 2 or 4
  • None of these
Solutions
Question - 19

int main()
{
int @a = 10;
printf("%d",@a);
return 0;
}

  • Compilation Error
  • 10
  • @10
  • None of these
Solutions
Question - 20

Predict the output of the following code segment:
// Add stdio.h header file in below code

int main()
{
int x = 6;
int y = 4;
int z;
if(!x >= 5)
y = 3;
z = 2;
printf(“%d %d”, z, y);
return 0;
}

  • 2 4
  • 4 2
  • 3 2
  • 2 3
Solutions
Tags:
C-programming MCQ (Multiple Choice Questions), Advanced C-programming Freamework MCQ, C-programming MCQ Online test,C-programming MCQ Questions and answers PDF, C-programming Interview Questions With Answers, C-programming Technical Questions with full explanation