1 20 22 BDC 13 A 1 1 A Obj: S. N O YE AR MAJ OR S U B UN IT Chap TER SE C. Q.T YPE
1 20 22 BDC 13 A 1 1 A Obj: S. N O YE AR MAJ OR S U B UN IT Chap TER SE C. Q.T YPE
S
YE MAJ UN CHAP SE Q.T
N U QUESTION «»
AR OR IT TER C. YPE
O B
1 20 BDC 13 1 1 A OBJ When C Language was invented? ED
22 A
A. 1970 B. 1972
C. 1978 D. 1979
Answer is : B
2 20 BDC 13 1 1 A OBJ How many loops are there in C ED
22 A
A. 2 B. 3
C. 4 D. 1
Answer is : B
3 20 BDC 13 1 1 A OBJ Which of the following is executed by Preprocess? ED
22 A
A. #include<stdio.h> B. return 0
void main(int argc , char **
C. D. None of above
argv)
Answer is : A
4 20 BDC 13 1 1 A OBJ How many main() function we can have in our project? ED
22 A
A. 1 B. 2
Answer is : A
5 20 BDC 13 1 1 A OBJ The ASCII code of ‘A’ is? ED
22 A
A. 66D B. 41H
Answer is : B
6 20 BDC 13 1 1 A OBJ What is the job of Assembler in C programming? ED
22 A
It converts a
It converts source code into assembly language
A. B.
assembly code program into machine
language
It convert code generated by
C. Preprocessor to assembly D. None of the above
code
Answer is : B
7 20 BDC 13 1 1 A OBJ #include<stdio.h> ED
22 A
int main()
{
int a@ = 10;
printf("%d", a@);
return 0;
}
A. 10 B. 10@
[Error] stray '@' in
C. @ D.
program
Answer is : D
8 20 BDC 13 1 1 A OBJ What is the extension of File produced by compiler on ED
22 A
Windows?
A. .a B. .exe
C. .out D. .obj
Answer is : B
9 20 BDC 13 1 1 A OBJ int,chrar,float,real are all ED
22 A
A. codes B. pragmas
C. Keywords D. prototype
Answer is : C
10 20 BDC 13 1 1 A OBJ which is an electornic machine that makes performing ED
22 A
any task very easy.
A. Computer B. keyboard
C. mouse D. monitor
Answer is : A
11 20 BDC 13 1 1 A OBJ ALU Stands for ED
22 A
Answer is : B
12 20 BDC 13 1 1 A OBJ what is the step by step process to solve a problem ED
22 A
A. Algorithm B. Beta
C. Alpha D. cybase
Answer is : A
13 20 BDC 13 1 1 A OBJ ANSI Stands for ED
22 A
American National
A. B. Americannationalsavingin
standard Institute
American National American National standard
C. D.
saving Income Information
Answer is : A
14 20 BDC 13 1 1 A OBJ The Structure of the C Language can be divided in the ---- ED
22 A
--------------- parts
A. 2 B. 3
C. 4 D. 6
Answer is : D
15 20 BDC 13 1 1 A OBJ Every program statement in a C program must end with a- ED
22 A
---------------
A. , B. ;
C. * D. ~
Answer is : B
16 20 BDC 13 1 1 A OBJ C is a general purpose _________ language. ED
22 A
A. Machine B. Assembly
Answer is : C
17 20 BDC 13 1 1 A OBJ The size of integer in bytes ED
22 A
A. 8 B. 2
C. 4 D. 3
Answer is : B
18 20 BDC 13 1 1 A OBJ # define is a compiler directive and a not a statement. ED
22 A
A. Assembler B. compiler
C. preprocessor D. automatic
Answer is : C
19 20 BDC 13 1 1 A OBJ Preprocessor directive are placed at the ________ of the ED
22 A
program
A. end B. middle
Answer is : C
20 20 BDC 13 1 1 A OBJ The _____ function is used to display the output on the ED
22 A
screen.
A. Printf B. Print
C. Put D. Output
Answer is : A
21 20 BDC 13 1 1 A OBJ C was evolved from A) ALGOL B) ED
22 A
BCPL C) B D) all the above
A. ALGOL B. BCPL
C. B D. All of the above
Answer is : D
22 20 BDC 13 1 1 A OBJ The size of Character in bytes ED
22 A
A. 2 B. 1
C. 4 D. 8
Answer is : B
23 20 BDC 13 1 1 A OBJ The size of signed long int in bytes ED
22 A
A. 2 B. 4
C. 8 D. 10
Answer is : B
24 20 BDC 13 1 1 A OBJ The size of float in bytes ED
22 A
A. 1 B. 2
C. 4 D. 8
Answer is : C
25 20 BDC 13 1 1 A OBJ The size of long double is in bytes ED
22 A
A. 1 B. 4
C. 8 D. 10
Answer is : D
26 20 BDC 13 1 1 A OBJ Do not use semicolon at the end of _______ directive ED
22 A
A. #define B. main
C. for D. do
Answer is : A
27 20 BDC 13 1 1 A OBJ Use _______ quotes for string constans ED
22 A
A. single B. double
Answer is : B
28 20 BDC 13 1 1 A OBJ __________ is used to print a decimal integer. ED
22 A
A. %d B. %x
C. %c D. %s
Answer is : A
29 20 BDC 13 1 1 A OBJ ED
22 A
______ is used to print a single character
A. %g B. %x
C. %c D. %s
Answer is : C
30 20 BDC 13 1 1 A OBJ When braces are used to group statements, make sure that ED
22 A
the opening brace has a corresponding _____brace last
A. First B. Closing
C. last D. opening
Answer is : B
31 20 BDC 13 2 1 A OBJ which is a powerful decision-making statement ED
22 A
A. while B. do
C. if D. for
Answer is : C
32 20 BDC 13 2 1 A OBJ --------------is a two-way decision statement. ED
22 A
A. while B. if
C. do D. for
Answer is : B
33 20 BDC 13 2 1 A OBJ The switch expression must be an _____ type. ED
22 A
A. Internal B. Float
Answer is : A
34 20 BDC 13 2 1 A OBJ How many default labels for switch statement ED
22 A
A. 1 B. 2
C. 3 D. many
Answer is : A
35 20 BDC 13 2 1 A OBJ The use of exit ( ) function requires the inclusion of the ED
22 A
header file
A. stdlib.h B. stdio.h
C. conio.h D. main.h
Answer is : A
36 20 BDC 13 2 1 A OBJ --------------------practice is to avoid using goto ED
22 A
A. Bad B. better
C. best D. good
Answer is : D
37 20 BDC 13 2 1 A OBJ Three actions of for loops are initialization, _______ ED
22 A
incrementing
A. Testing B. looping
Answer is : A
38 20 BDC 13 2 1 A OBJ The statements control the flow of execution are also ED
22 A
known as ____ statements
A. for B. while
C. control D. do…while
Answer is : C
39 20 BDC 13 2 1 A OBJ If statement-block may be a single statement or _______ ED
22 A
of statement.
A. Two B. group
C. many D. control
Answer is : B
40 20 BDC 13 2 1 A OBJ In C has a built – in multiway decision statement known ED
22 A
as a ______
A. for B. do
C. if D. switch
Answer is : D
41 20 BDC 13 2 1 A OBJ ED
22 A
A program loop consists of _______ Segments
A. 1 B. 2
C. 3 D. 4
Answer is : B
42 20 BDC 13 2 1 A OBJ The entry –controlled is also known as _______ ED
22 A
Answer is : A
43 20 BDC 13 2 1 A OBJ The exit-controlled is also known as ED
22 A
Answer is : A
44 20 BDC 13 2 1 A OBJ The simplest of all the looping structures in C is the ED
22 A
________ statement
A. for B. do..while
C. while D. switch
Answer is : C
45 20 BDC 13 2 1 A OBJ Use ______ loop if the counter-based control is ED
22 A
necessary.
A. do..while B. for
C. while D. switch
Answer is : A
46 20 BDC 13 2 1 A OBJ Use ______ loop if the sentinel-based control is required. ED
22 A
A. while B. for
C. switch D. do ..while
Answer is : A
47 20 BDC 13 2 1 A OBJ ED
22 A
Do not forget to place the increment statement in the body of a ------Or do …
A. switch B. For
Answer is : C
48 20 BDC 13 2 1 A OBJ An_______is a fixed –size sequenced collection of ED
22 A
element of the same data type.
A. Data B. Information
C. Array D. none
Answer is : C
49 20 BDC 13 2 1 A OBJ ED
22 A
In an array individual values are called _______
A B
variables data
. .
C D
elements All of the above
. .
Answer is : C
50 20 BDC 13 2 1 A OBJ
22 A
The general form of array declaration is type _____________[size].
A B
data elements
. .
C D
variable name none
. .
Answer is : C
S
S. YE MAJ UN CHAP SE Q.T
U QUESTION «»
NO AR OR IT TER C. YPE
B
51 20 BDC 13 2 1 A OBJ An array that uses more than two subscript is referred to ED
22 A
as__________ array
Answer is : D
52 20 BDC 13 2 1 A OBJ ED
22 A
An array can be initialized either at compile time or at ____________.
A. static B. Dynamic
C. void D. Runtime
Answer is : D
53 20 BDC 13 2 1 A OBJ ED
22 A
________ is the process of arranging the elements of an array in order.
A. sorting B. searching
Answer is : A
54 20 BDC 13 2 1 A OBJ The process of allocating memory at compile time is ED
22 A
known as _________ memory location.
A. static B. dynamic
Answer is : A
55 20 BDC 13 2 1 A OBJ The arrays that receive static memory allocation are ED
22 A
called ___________ array.
A. static B. Dynamic
Answer is : A
56 20 BDC 13 2 1 A OBJ ED
22 A
Dynamic array are created using points variables and memory management
A. malloc B. calloc
Answer is : D
57 20 BDC 13 2 1 A OBJ _________ is the process of finding the location of the ED
22 A
specified element in a list
A. Technique B. searching
Answer is : D
59 20 BDC 13 2 1 A OBJ What is the output of C Program.? ED
22 A int main()
{
while(true)
{
printf("RABBIT");
break;
}
return 0;
}
RABBIT is printed
A. RABBIT B. unlimited number of
times.
C. No output D. Compiler error.
Answer is : D
60 20 BDC 13 2 1 A OBJ Choose a correct C Statement. ED
22 A
Answer is : D
61 20 BDC 13 3 1 A OBJ ED
22 A
The C ________ provides several tools that use unavailable in other high-lev
A. language B. preprocessor
C. compiler D. none
Answer is : B
62 20 BDC 13 3 1 A OBJ ___________ function concatenate two strings. ED
22 A
A. strcon() B. strcat()
Answer is : B
63 20 BDC 13 3 1 A OBJ __________ function compares two strings ED
22 A
A. strcmp() B. strcpy()
Answer is : A
64 20 BDC 13 3 1 A OBJ _______ variables are also referred to as local or internal ED
22 A
variables
A. static B. external
C. automatic D. register
Answer is : C
65 20 BDC 13 3 1 A OBJ n which header file is the NULL macro defined? ED
22 A
A. stdio.h B. stddef.h
Answer is : C
66 20 BDC 13 3 1 A OBJ The precedence of the _________ operator is higher than ED
22 A
all arithmetic and relational operators.
A. member B. structure
C. logical D. All
Answer is : A
67 20 BDC 13 3 1 A OBJ ____________is a function used to open an existing file ED
22 A
A. fopen() B. Open
C. Open() D. none
Answer is : A
68 20 BDC 13 3 1 A OBJ What is (void*)0? ED
22 A
Answer is : A
69 20 BDC 13 3 1 A OBJ Stdio.h stands for the name ED
22 A
Answer is : A
70 20 BDC 13 3 1 A OBJ How will you print \\n on the screen? ED
22 A
A. printf("\\n"); B. echo"\\n";
C. printf('n'); D. printf("\\\\n");
Answer is : D
71 20 BDC 13 3 1 A OBJ If the two strings are identical, then strcmp() function ED
22 A
returns
A. -1 B. 1
C. 0 D. Yes
Answer is : C
72 20 BDC 13 3 1 A OBJ The library function used to find the last occurrence of a ED
22 A
character in a string is
A. strnstr() B. laststr()
C. strrchr() D. strstr()
Answer is : C
73 20 BDC 13 3 1 A OBJ which of the following function is more appropriate for ED
22 A
reading in a multi-word string?
A. printf(); B. scanf();
C. gets(); D. puts();
Answer is : C
74 20 BDC 13 3 1 A OBJ Which directory the compiler first looks for the file ED
22 A
when using #include?
Answer is : B
75 20 BDC 13 3 1 A OBJ #include<stdio.h>int main();void main(){ ED
22 A printf("Okay"); }
A. okay B. No Output
Compile Error.We
Compiler error.Mismatch in
C. cannot declare main() D.
declaration & definition.
function.
Answer is : D
76 20 BDC 13 3 1 A OBJ What function can be used to free the memory allocated ED
22 A
by calloc()?
A. dealloc(); B. strcat();
C. free(); D. memcpy();
Answer is : C
77 20 BDC 13 3 1 A OBJ How many main() function we can have in our project. ED
22 A
A. 1 B. 2
Answer is : A
78 20 BDC 13 3 1 A OBJ What is sizeof() in C? ED
22 A
A. Operator B. Function
Answer is : A
79 20 BDC 13 3 1 A OBJ hich of the following is executed by Preprocess ED
22 A
A. #include<stdio.h> B. return 0
void main(int argc,char **
C. D. 1
argv)
Answer is : A
80 20 BDC 13 3 1 A OBJ How many times CppBuzz.com is printed? ED
22 A
void main()
{
int a = 0;
while(a++ < 5)
printf("CppBuzz.com");
}
A. 4 times B. 5 times
Answer is : B
81 20 BDC 13 3 1 A OBJ The function ___________ is used to determine the ED
22 A
length of a string.
A. len B. strlen
C. length D. strangle
Answer is : B
82 20 BDC 13 3 1 A OBJ The functions strcat has __________ parameters ED
22 A
A. 2 B. 3
C. 4 D. 5
Answer is : A
83 20 BDC 13 3 1 A OBJ What is an Array in C language.? ED
22 A
An array contains
A group of elements of same
A. B. more than one
data type.
element
Array elements are stored in
C. memory in continuous or D. All the above.
contiguous locations.
Answer is : D
84 20 BDC 13 3 1 A OBJ Choose a correct statement about C language arrays. ED
22 A
Answer is : D
85 20 BDC 13 3 1 A OBJ What are the Types of Arrays.? ED
22 A
Answer is : D
86 20 BDC 13 3 1 A OBJ An array Index starts with.? ED
22 A
A. -1 B. 0
C. 1 D. 2
Answer is : B
87 20 BDC 13 3 1 A OBJ Choose a correct statement about C language arrays. ED
22 A
Array element
An array size can not changed value can be
A. B.
once it is created. changed any
number of times
To access Nth element of an
C. array students, use students[n- D. All the above
1] as the starting index is 0.
Answer is : D
88 20 BDC 13 3 1 A OBJ What is the output of C Program.? ED
22 A
int main() {
int a[];
a[4] = {1,2,3,4};
printf("%d", a[0]); }
A. 1 B. 2
C. 4 D. Compiler error
Answer is : D
89 20 BDC 13 3 1 A OBJ What is the output of C Program.? ED
22 A
int main() {
a[0]++;
int i=0;
while(i<3) {
i++; }
}
A. 20 30 40 B. 41 30 20
Answer is : C
90 20 BDC 13 3 1 A OBJ What is the output of C Program with arrays.? ED
22 A
int main()
int rollno[3]=[1001,1002,1003];
printf("%d", rollno[1]);
A. 1002 B. 1003
Answer is : D
91 20 BDC 13 4 1 A OBJ
22 A
A function is a self-contained block of code that performs Ea Dparticular _____
A. program B. function
C. module D. Task
Answer is : D
92 20 BDC 13 4 1 A OBJ A function can be called by simply using the function ED
22 A
name followed by a list of _____________
A. parantheses B. parameter
C. actualparameter D. none
Answer is : C
93 20 BDC 13 4 1 A OBJ ED
22 A
Passing address of parameters to the functions is referred to as pass by ____
A. address B. value
C. array D. string
Answer is : A
94 20 BDC 13 4 1 A OBJ A variable declared inside a function by default assumes ED
22 A
_________ storage variables.
A. local B. global
C. extern D. register
Answer is : A
95 20 BDC 13 4 1 A OBJ Passing an array to a function must be called by passing ED
22 A
only the __________
A. value B. size
C. array D. all
Answer is : C
96 20 BDC 13 4 1 A OBJ ED
22 A
Passing an array to a function, the prototype must show that the _________
A. value B. size
C. argument D. none
Answer is : C
97 20 BDC 13 4 1 A OBJ The operator used to get value at address stored in a ED
22 A
pointer variable is
.
.
.
A. * B. &
C. && D. ||
Answer is : A
98 20 BDC 13 4 1 A OBJ Choose correct statement about Functions in C ED
22 A
Language.
A) A Function is a group
of c statements which can
Every Function has a
A. be reused any number of B.
return type.
times.
Answer is : D
99 20 BDC 13 4 1 A OBJ Choose a correct statement about C ED
22 A
Language Functions.
Answer is : D
10 20 BDC 13 4 1 A OBJ Choose a correct statement about C Function.?
0 22 A
main()
printf("Hello");
}
"main" is the name of default main() is same
A. B.
must and should Function. as int main()
By default, return 0 is added as
C. the last statement of a function D. All the above
without specific return type.
Answer is : D
Answer is : C
102 2022 BDC 13A 4 1 A OBJ What is the output of C Program E D
with functions.?
void show();
int main()
show();
printf("ARGENTINA ");
return 0;
void show()
printf("AFRICA ");
ARGENTINA AFRICA
A. B.
AFRICA ARGENTINA
C. ARGENTINA D. Compiler error
Answer is : B
103 2022 BDC 13A 4 1 A OBJ How many values can a C Function E D
return at a time.?
Maximum of
A. Only One Value B.
two values
Maximum of Maximum of 8
C. D.
three values values
Answer is : A
104 2022 BDC 13A 4 1 A OBJ What are types of Functions in C E D
Language.?
Answer is : C
105 2022 BDC 13A 4 1 A OBJ Choose correct statements about C E D
Language Pass By Value.
Answer is : D
106 2022 BDC 13A 4 1 A OBJ Which of the following is the correct E D
syntax to send an array as a parameter
to function?
A. func(&array); B. func(#array);
C. func(*array); D. func(array[size]);
Answer is : A
107 2022 BDC 13A 4 1 A OBJ What will be the output of the E D
following C code?
1. #include <stdio.h>
2. void foo(int*);
3. int main()
4. {
5. int i = 10, *p =
&i;
6. foo(p++);
7. }
8. void foo(int *p)
9. {
10. printf("%d\n",
*p);
11. }
Some garbage
A. 10 B.
value
Compile time Undefined
C. D.
error behaviour
Answer is : A
108 2022 BDC 13A 4 1 A OBJ What will be the output of the E D
following C code?
1. #include <stdio.h>
2. int main()
3. {
4. int i = 10;
5. void *p = &i;
6. printf("%f\n",
*(float*)p);
7. return 0;
8. }
Answer is : D
109 2022 BDC 13A 4 1 A OBJ Comment on the following pointer E D
declaration.
int *ptr, p;
ptr and p, both
ptr is a pointer to
A. B. are pointers to
integer, p is not
integer
ptr is a pointer to ptr and p both
C. integer, p may or D. are not pointers
may not be to integer
Answer is : A
110 2022 BDC 13A 4 1 A OBJ What will be the output of the E D
following C code?
1. #include <stdio.h>
2. int main()
3. {
4. int *ptr, a = 10;
5. ptr = &a;
6. *ptr += 1;
7. printf("%d,%d/n",
*ptr, a);
8. }
A. 10,10 B. 11,10
C. 10,11 D. 11,11
Answer is : D
111 2022 BDC 13A 4 1 A OBJ Comment on the following C E D
statement.
Answer is : A
112 2022 BDC 13A 4 1 A OBJ Which is an indirection (in pointer E D
value ) operator among the following?
A. & B. *
C. -> D. .
Answer is : B
113 2022 BDC 13A 4 1 A OBJ Which of the following does not E D
initialize ptr to null (assuming variable
declaration of a as int a=0;)?
int *ptr = &a –
A. int *ptr = &a; B.
&a;
int *ptr = a – All of the
C. D.
a; mentioned
Answer is : A
114 2022 BDC 13A 4 1 A OBJ What will be the output of the E D
following C code?
1. #include <stdio.h>
2. int x = 0;
3. void main()
4. {
5. int *ptr = &x;
6. printf("%p\n",
ptr);
7. x++;
8. printf("%p\n ",
ptr);
9. }
Different
A. Same address B.
address
Compile time
C. D. Varies
error
Answer is : A
115 2022 BDC 13A 4 1 A OBJ What will be the output of the E D
following C code?
1. #include <stdio.h>
2. void main()
3. {
4. int x = 0;
5. int *ptr = &x;
6. printf("%d\n",
*ptr);
7. }
Answer is : C
116 2022 BDC 13A 4 1 A OBJ What is the correct way to declare and E D
assign a function pointer?
Answer is : A
117 2022 BDC 13A 4 1 A OBJ Calling a function f with a an array E D
variable a[3] where a is an array, is
equivalent to __________
A. f(a[3]) B. f(*(a + 3))
all of the
C. f(3[a]) D.
mentioned
Answer is : D
118 2022 BDC 13A 4 1 A OBJ What will be the output of the E D
following C code?
1. #include <stdio.h>
2. void main()
3. {
4. char s[] =
"hello";
5. s++;
6. printf("%c\n",
*s);
7. }
C. e D. o
Answer is : A
119 2022 BDC 13A 4 1 A OBJ Which one is not return Type keyword E D
in C?
A. void B. printf
C. int D. float
Answer is : B
120 2022 BDC 13A 4 1 A OBJ The '*" symbol is used for ? E D
Answer is : C
121 2022 BDC 13A 5 1 A OBJ Structure with in a structure means E D
_________ of a structure.
A. loop B. module
C. nesting D. none
Answer is : C
122 2022 BDC 13A 5 1 A OBJ include int main (){ FILE E D
*fp; fp =
fopen("source.txt", "r");
return 0;}
For reading and
A. For reading B.
writing
For creating a For creating a
new file new file
C. D.
"source.txt" for "source.txt" for
reading writing.
Answer is : A
123 2022 BDC 13A 5 1 A OBJ Choose a correct statement about C E D
file "R" mode operation using
fopen.
fopen("abc.txt","r");
If the file
abc.txt is
If the file abc.txt is
not found,
A. found, fopen returns B.
fopen
a FILE pointer.
returns
NULL or 0.
File abc.txt is only
opened in Read
All the
C. Mode. Now write D.
above
operation is
performed.
Answer is : D
124 2022 BDC 13A 5 1 A OBJ What is the need for closing a file in C E D
language.?
Closing a file
fclose(fp) closes a
clears Buffer
file to release the
A. B. contents from
memory used in
RAM or
opening a file.
memory.
Unclosed files
occupy memory
C. and PC hangs D. All the above
when on low
memory.
Answer is : D
125 2022 BDC 13A 5 1 A OBJ Where is a file temporarily stored E D
before read or write operation in C
language.?
A. Notepad B. RAM
Answer is : D
126 2022 BDC 13A 5 1 A OBJ What is a C FILE data type.? E D
Answer is : A
127 2022 BDC 13A 5 1 A OBJ What is the keyword used to declare a E D
C file pointer.?
A. file B. FILE
C. FILEFP D. filefp
Answer is : B
128 2022 BDC 13A 5 1 A OBJ What is a structure in C language.? E D
A structure is a
A structure is a
collection of
collection of
elements that
A. elements that B.
can be of
can be of same
different data
data type.
type.
Elements of a
C. structure are D. All the above
called members.
Answer is : D
129 2022 BDC 13A 5 1 A OBJ What is the size of a C structure.? E D
A. C structure is B. Size of C
always 128 structure is the
bytes. total bytes of
all elements of
structure.
Size of C
structure is the None of the
C. D.
size of largest above
element.
Answer is : B
130 2022 BDC 13A 5 1 A OBJ What is the output of C program with E D
structures.?
int main()
structure hotel
int items;
char name[10];
}a;
strcpy(a.name, "TAJ");
a.items=10;
printf("%s", a.name);
return 0;
Answer is : C
131 2022 BDC 13A 5 1 A OBJ Choose a correct statement about C E D
structures.
Structure
Structure elements members can
can be initialized not be
A. B.
at the time of initialized at
declaration. the time of
declaration
Only integer
members of
None of the
C. structure can be D.
above
initialized at the
time of declaraion
Answer is : B
132 2022 BDC 13A 5 1 A OBJ Choose a correct statement about C E D
structure elements.?
structure
Structure elements elements are
are stored on stored in
A. B.
random free register
memory locations memory
locations
structure elements
are stored in None of the
C. D.
contiguous above.
memory locations
Answer is : C
133 2022 BDC 13A 5 1 A OBJ A C Structure or User defined data E D
type is also called.?
Answer is : D
134 2022 BDC 13A 5 1 A OBJ What are the uses of C Structures.? E D
Answer is : D
135 2022 BDC 13A 5 1 A OBJ What are the first and second E D
arguments of fopen?
A character
A character string string
containing the containing the
name of the file & name of the
A. B.
the second user & the
argument is the second
mode argument is
the mode
A character string
containing file
None of the
C. pointer & the D.
mentioned
second argument
is the mode
Answer is : A
136 2022 BDC 13A 5 1 A OBJ For binary files, a ___ must be E D
appended to the mode string.
A. Nothing B. “b”
C. “binary” D. “01”
Answer is : B
137 2022 BDC 13A 5 1 A OBJ What will fopen will return, if there is E D
any error while opening a file?
A. Nothing B. EOF
Depends on
C. NULL D.
compiler
Answer is : C
138 2022 BDC 13A 5 1 A OBJ What is the return value of getc()? E D
The next
character from
EOF for end of
A. the stream is B.
file or error
not referred by
file pointer
None of the
C. Nothing D.
mentioned
Answer is : B
139 2022 BDC 13A 5 1 A OBJ When a C program is started, O.S E D
environment is responsible for opening
file and providing pointer for that file?
A. Standard input B. Standard output
All of the
C. Standard error D.
mentioned
Answer is : D
140 2022 BDC 13A 5 1 A OBJ In C language, FILE is of which data E D
type?
A. int B. char *
None of the
C. struct D.
mentioned
Answer is : C
141 2022 BDC 13A 5 1 A OBJ What is meant by ‘a’ in the following E D
C operation?
fp = fopen("DCFNameList.txt",
"a");
A. Attach B. Append
C. Apprehend D. Add
Answer is : B
142 2022 BDC 13A 5 1 A OBJ Which of the following mode E D
argument is used to truncate?
A. a B. f
C. w D. t
Answer is : C
143 2022 BDC 13A 5 1 A OBJ Which type of files can’t be opened E D
using fopen()?
A. .txt B. .bin
none of the
C. .c D.
mentioned
Answer is : D
144 2022 BDC 13A 5 1 A OBJ What is FILE reserved word? E D
Answer is : D
145 2022 BDC 13A 5 1 A OBJ stdout, stdin and stderr are ________ E D
C. Streams D. Structure
Answer is : A
146 2022 BDC 13A 5 1 A OBJ Which of the following statements E D
about stdout and stderr are true?
Both connected
A. Same B.
to screen always
stdout is line
Both connected
buffered but
C. to screen by D.
stderr is
default
unbuffered
Answer is : C
147 2022 BDC 13A 5 1 A OBJ Which one of the following is correct E D
syntax for opening a file.
FILE
A FILE *fopen(const
*fopen(cons B.
. *filename)
t *filename,
const char
*mode)
FILE
*open(const FILE
D
C. *filename, open(const*filename
.
const char )
*mode)
Answer is : A
148 2022 BDC 13A 5 1 A OBJ What is the function of the mode ‘ E D
w+’?
Answer is : B
149 2022 BDC 13A 5 1 A OBJ If the mode includes b after the initial E D
letter, what does it indicates?
Answer is : C
150 2022 BDC 13A 5 1 A OBJ _____removes the named file, so that
a subsequent attempt to open it will
fail.
remove(const
A. B. remove(filename)
*filename)
C. remove() D. fclose(filename)
Answer is : A
153 2022 BDC 13A 1 1 B DESC List out any five keywords E D
basically used.
Difference between
Sturctures and Union.
166 2022 BDC 13A 2 1 B DESC List out the use of while loop E D
in c program.
167 2022 BDC 13A 2 1 B DESC what is the use of if then else E D
in c program.
184 2022 BDC 13A 4 1 B DESC Define Function and list its E D
uses.
186 2022 BDC 13A 4 1 B DESC what does & and * refers. E D
234 2022 BDC 13A 4 1 C DESC what is the syntax for call by E D
value.
235 2022 BDC 13A 4 1 C DESC what is the syntax for call by E D
reference.