Introduction Flashcards

1
Q

Operator’s precedence determines which operator is ____________.
a.) Faster
b.) Take less memory
c.) Take no argument
d.) Evaluated first

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

The operator &laquo_space;is used for ________________.
a.) Shifting bits to left
b.) Shifting bits to right
c.) Equality Checking
d.) None of these

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The associability of = operator is ________.
a.) Right to Left
b.) Left to Right
c.) None of these
d.) All of above

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which statement is correct?
a.) C Library functions provide I/O facilities
b.) C inherent I/O facilities
c.) C doesn’t have I/O facilities
d.) Both (a) and (c)

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Header files in C contain ___________.
a.) Compiler Commands
b.) Library functions
c.) Header information of C Programs
d.) Operators for files

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which pair is used for single character I/O.?
a.) getchar() and putchar()
b.) scanf() and printf()
c.) input() and output()
d.) None of these

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

The printf() returns __________ value when an error occurs.
a.) Positive value
b.) Zero
c.) Negative Value
d.) None of these

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Identify wrong statement:
a.) putchar(65)
b.) putchar(‘x’)
c.) putchar(“x”)
d.) putchar(‘\n’)

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Null character is represented by _____________.
a.) \n
b.) \0
c.)\o
d.)\e

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Testing & Conversion character functions in C are available in ____________.
a.) ctype.h
b.) string.h
c.) math.h
d.) conio.h

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

An Ampersand in scanf() before the name of a variable denotes ___________.
a.) Actual Value
b.) Variable Name
c.) Address
d.) Data Type

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Symbolic constants can be defined using _____________.
a.) #define
b.) const
c.) symbols
d.) None of these

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Which header file is essential for using strcmp() function.?
a.) string.h
b.) strings.h
c.) text.h
d.) strcmp.h

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

malloc() used in Dynamic Memory Allocation is available in ____________.
a.) stream.h
b.) malloc.h
c.) alloc.h
d.) stdio.h

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

A statement differs from an expression by terminating with a _________.
a.) Semicolon (;)
b.) Colon (:)
c.) NULL
d.) dot (.)

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

C supports ________ Looping statements.
a.) 5
b.) 3
c.) 6
d.) 8

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Which of the following is an unconditional control structure?
a.) Do-while
b.) if-else
c.) goto
d.) for

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Which of the following is a keyword is used for a storage class.?
a.) printf
b.) external
c.) auto
d.) scanf

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

In C language ‘a’ represents ______________________.
a.) a digit
b.) an integer
c.) a character
d.) a word

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

How many keywords are available in ‘C’?
a.) 32
b.) 34
c.) 36
d.) 30

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

The number of Arithmetic operators in C language is ____________.
a.) 4
b.) 5
c.) 6
d.) 7

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Advantage of UNION over STRUCTURE is _______________.
a.) Memory Storage
b.) Memory Location
c.) Memory Screen
d.) None of these

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Maximum number of elements in the array declaration “ int arr[5][8]; ” is ________.
a.) 28
b.) 32
c.) 35
d.) 40

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Array subscripts in C always start at __________.
a.) 1
b.) -1
c.) as per programmer
d.) 0

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Output of the printf(“2.3f\n”,17.23478) will be _____________.
a.) 17.23478
b.) 17.235
c.) 17.2348
d.) 17.23

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Which is the correct way to declare a pointer?
a.) int ptr;
b.) *int *ptr;
c.) int *ptr;
d.) *int ptr;

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

What will be the value of the following:
1. floor(5.8)
2. floor(-5.8)
a.) -5,-6
b.) 5, -6
c.) -5,6
d.) 5,6

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

What would be the value of X after execution of the following statements?
int x,y=10;
char z=’a’;
x=y+z;
a.) Invalid
b.) 17
c.) 107
d.) 10a

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

What will be the output the following:
#include<stdio.h>
#include<conio.h>
void main()
{
int *i, *j, a=12, b=2, c ;
c= (a=a+b, b=a/b, a=a*b, b=a-b);
i= &c;
printf (“%d”,--(*i));
}
a.) 93
b.) 92
c.) 91
d.) 90</conio.h></stdio.h>

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

A ________ is a place where we can store values. Size of INT is ____________ bits.
a.) int, 2
b.) variable, 2
c.) variable, 16
d.) int, 16

31
Q

What will be the output the following:
#include<stdio.h>
#include<conio.h>
void main()
{
int *i, *j, a=12, b=2, c ;
c= (a=a+b, b=a/b, a=a*b, b=a-b);
i= &c;
printf (“%d”,--(*i));
}
a.) 93
b.) 92
c.) 91
d.) 90</conio.h></stdio.h>

32
Q

Study the following program:
#include<stdio.h>
#include<conio.h>
void main()
{
int a=7,b=5;
switch(a/a%b)
{
case 1: a=a-b;
case 2: a=a+b;
case 3: a=a*b;
case 4: a=a/b;
default: a=a;
}
printf(“%d”, a);
}
What will be the output?
a.) 7
b.) 5
c.) 2
d.) None of above</conio.h></stdio.h>

33
Q

A ________ operator applies to two operands, while a _______ operator applies to a single
operand.
a.) Binary, Unary
b.) Ternary, Binary
c.) Unary, Ternary
d.) None of these

34
Q

Study the following C program:
#include<stdio.h>
#include<conio.h>
void main()
{
char *str1,*str2,*str3;
str1=”India is my”;
str2=”!!yrtnuoC”;
str3=”Gujarat”;
clrscr();
strncat(str1,strrev(str2),strlen(str3));
puts(str1);
}
What will be the value of STR1 after execution of the above program?
a.) India is my Country!!
b.) India is my !!yrtnuoC
c.) India is my Country
d.) None of these</conio.h></stdio.h>

35
Q

Study it:
#include<stdio.h>
#include<conio.h>
void main()
{
int count=1,digit=0;
while(digit<=9)
{
\++count;
\++digit;
}
printf(“%d”,count);
}
What will be the output?
a.) 10
b.) 9
c.) 11
d.) 12</conio.h></stdio.h>

36
Q

What will be the output of following program?
#include<stdio.h>
#include<conio.h>
void main()
{
int i, j, k;
j=5;
i= 2*j/2;
k=2*(j/2);
printf(“i=%d \n k=%d”, i, k);
}
a.) i=5, k=5
b.) i=4, k=4
c.) i=5, k=4
d.) i=4, k=5</conio.h></stdio.h>

37
Q

Study the following program:
#include<stdio.h>
#include<conio.h>
void main()
{
int a, b, c;
a=2;
b=2*(a++);
c=2*(++a);
printf(“b=%d \n c=%d”,b,c);
}
a.) b=4,c=6
b.) b=3,c=8
c.) b=3, c=6
d.) b=4, c=8</conio.h></stdio.h>

38
Q

Study the following program:
#include<stdio.h>
#include<conio.h>
void main()
{
int *ptr, i;
i=12;
*ptr=i * i;
\++i;
printf(“%d %d”, i, *ptr);
}
a.) 12, 144
b.) 13, 144
c.) 13, 0
d.) None of these</conio.h></stdio.h>

39
Q

Study the following program:
#include<stdio.h>
#include<conio.h>
void main()
{
int a=3;
switch(a)
{ case 1: printf(“One”);
case 3: printf(“Three”);
case 5: printf(“Five”);
case 7: printf(“Seven”);
default: printf(“Odd”);
break; }
What will be the output of above program?
a.) Three
b.) Three Five Odd
c.) Three Five Seven Odd
d.) Three Five Seven</conio.h></stdio.h>

40
Q

Study the following program:
#include<stdio.h>
#include<conio.h>
union example
{
int i;
float f;
double d;
};
void main()
{
union example e;
printf(“\n Size of union is: %d”, size of(e));
}
What will be the output of this program?
a.) 8
b.) 6
c.) 10
d.) 14</conio.h></stdio.h>

41
Q

Study the following program:
#include<stdio.h>
#include<conio.h>
void main()
{
int i=0, X=0;
do
{
if(i%5==0)
{
X++;
}
\++i;
} while (i <20);
}
What will be the output of this program?
a.) X=4
b.) X=20
c.) X=25
d.) X=10</conio.h></stdio.h>

42
Q

Study the following program:
#include<stdio.h>
#include<conio.h>
void main()
{
int i=0, X=0;
while (i<20)
{
if(i%5==0) { X+=i; }
i++;
}
printf(“X=%d”, X);
}
What will be the output of above program?
a.) X=30
b.) X=20
c.) X=25
d.) X=10</conio.h></stdio.h>

43
Q

Study the following program:
#include<stdio.h>
#include<conio.h>
void main()
{
int i, n=2;
for(i=0; i<2; i++)
{
if(!(i<=n) && (++n==i))
n=n+2;
else
n=n-2;
}
}
What will be the output of this program?
a.) 3
b.) 4
c.) 2
d.) None of these</conio.h></stdio.h>

44
Q

Pre-programming technique is.??
a.) Flow Chart
b.) Algorithm
c.) Dry Run
d.) All of Above

45
Q

Which is the step by step representation of program creation?
a.) Algorithm
b.) Dry Run
c.) Flow Chart
d.) None of Above

46
Q

Dry Run is a __________.
a.) Tabular Development
b.) Graphical Representation
c.) Step by Step Development
d.) None of Above

47
Q

‘B’ language is developed by___________.
a.) Martin Richards
b.) Dennis Ritchie
c.) Ken Thompson
d.) Berian Kerningham

48
Q

Which of the following symbol is use for single line comment?
a.) //
b.) /* …… */
c.)
d.) ;

49
Q

Which is not the graphical representation of program creation?
a.) Algorithm
b.) Dry Run
c.) Flow Chart
d.) (A) and (B) both

50
Q

ANSI C permits the use of as many as ________ case labels.
a.) 258
b.) 259
c.) 257
d.) 256

51
Q

Structure template is terminated by symbol _____________.
a.) Semicolon ( ; )
b.) Comma ( , )
c.) Space ( )
d.) Underscore ( _ )

52
Q

? : is ______________ operator.
a.) Logical
b.) Bitwise
c.) Assignment
d.) Conditional

53
Q

Which symbols used to define an array?
a.) [ ]
b.) < >
c.) { }
d.) ( )

54
Q

Find the error:
void mai n()
{
in t a= 11 ;
i f (a>0);
print f (“ I t s POSI TIVE” ) ;
el se
print f (“ I t s NEGAT IVE” );
}
a.) getch(); is missing
b.) statement missing
c.) misplaced else
d.) None of above

55
Q

Which is a relational operator?
a.) &&
b.) >=
c.) ? :
d.) /* …… */

56
Q

To check whether string is in upper case or not, which function is used?
a.) toupper ()
b.) upper ()
c.) isupper()
d.) None of above

57
Q

pow(), abs() & sqrt() are situated in ______________ header file.
a.) stdio.h, math.h, ctype.h
b.) string.h
c.) ctype.h
d.) math.h

58
Q

Which is not the part of UDF?
a.) Prototype of Function
b.) Calling of Function
c.) Definition of Function
d.) None of above

59
Q

How compare that two strings are equal or not?
a.) strcmp()
b.) strcat()
c.) strrev()
d.) strchr()

60
Q

Which is a storage class?
a.) auto
b.) static
c.) register
d.) All of above

61
Q

64 bits occupied by which data type?
a.) double
b.) long double
c.) unsigned int
d.) int

62
Q

Which special symbol is allowed for variable declaration ____________?
a.) Under Score ( _ )
b.) Tiled ( ~ )
c.) Caret ( ^ )
d.) Colon ( : )

63
Q

< , > are used for __________________.
a.) Function Call < , > are used for __________________.
a.) Function Call
b.) Array
c.) Link to Header file
d.) Function Definition

64
Q

Percentage style of “unsigned int” is ____________.
a.) %ld
b.) %c
c.) %u
d.) %lu

65
Q

______________as an alternative of simple if…else statement.
a.) Conditional Operator
b.) Ternary Operator
c.) ? : Operator
d.) All of above

66
Q

Which is not an Entry Control.?
a.) for loop
b.) while loop
c.) do…while loop
d.) All of above

67
Q

How many types of operators are there?
a.) 7
b.) 9
c.) 10
d.) 8

68
Q

What is the output of below program?
void mai n()
{
in t a= 11 , b ;
b=a++
print f (“ \n\ t B: %d” , b);
get ch();
}
a.) Error
b.) 12
c.) 11
d.) None of above

69
Q

a -=b is equivalent to ________________.
a.) a=b-a
b.) a=a-b
c.) b=b-a
d.) b=a-b

70
Q

{ } are used to group statements together as in a function, or in the body of a loop. Such a
grouping is known as _________________.
a.) Statement
b.) Block
c.) Loop
d.) Process

71
Q

Which is the Escape Sequence character?
a.) \n
b.) \o
c.) \a
d.) (A) and (B) both

72
Q

Null character is represented by ___________.
a.) NULL
b.) \o
c.) \0
d.) All of above

73
Q

________ Symbol behaves as STYLE while using with one variable and as REMINDER while
using with two variable/values.
a.) &
b.) %
c.) *
d.) #

74
Q

_____ and _____ are used to test more than one condition.
a.) &&, ||
b.) <=, >=
c.) ==, !=
d.) <, >