Technical Answers
Technical Answers
main()
{
int i = 1;
while(++i <= 5)
printf("%d ",i++);
}
A) 1 3 5
B) 2 4
C) 2 4 6
D) 2
ANS: B
Q2. In C, what are the various types of real data type (floating point data
type)?
A) float, long double
B) long double, short int
C) float, double, long double
D) short int, double, long int, float
ANS: C
Q3. number of keywords present in c language are .?
A) 32
B) 34
C) 62
D) 64
ANS: A
Q4. Each statement in a c program should end with.?
A) semicolon ;
B) colon :
C) period . (dot symbol)
D) none of the above.
ANS: A
Q5. Choose a correct statement.
A) c compiler converts your c program into machine readable language.
B) c editor allows you to type c programs. it is just like a notepad with extra
options.
C) console shows the output of a c program if it is text output.
D) all the above
ANS: A
return 0;
}
A) 8.0
B) 8.000000
C) 7
D) 8
ANS: D
Q10. What will be the output of the following C code?
#include <stdio.h>
int main()
{
int c = 2 ^ 3;
printf("%d\n", C);
}
A) 1
B) 8
C) 9
D) 0
ANS: A
Q11.What will be the output of the following C code?
#include <stdio.h>
int main()
{
unsigned int a = 10;
a = ~a;
printf("%d\n", A);
}
A) -9
B) -10
C) -11
D) 10
ANS: C
Q12 What will be the output of the following C code?
#include <stdio.h>
int main()
{
if (7 & 8)
printf("Honesty");
if ((~7 & 0x000f) == 8)
printf("is the best policy\n");
}
A) Honesty is the best policy
B) Honesty
C) is the best policy
D) No output
ANS: C
ANS: A
Q16.What will be the output of the following C code?
#include <stdio.h>
void main()
{
int x = 4, y, z;
y = --x;
z = x--;
printf("%d%d%d", x, y, z);
}
A)3 2 3
B) 2 2 3
C) 3 2 2
D) 2 3 3
ANS: D
ANS: B
Q20. What is the sizeof(void) in a 32-bit C?
A) 0
B) 1
C) 2
D) 4
ANS: B
Q21. There are two functional dependencies with the same set of attributes on the left side of the
arrow:
A->BC
A->B
A. A->BC
B. A->B
C. B->C
Answers: A
A. Dependent
B. Decomposition
C. Determinants
D. Database
Answers: C
A. B is a subset of A
B. A is a subset of B
C. A is a subset of A'
D. B is a subset of B'
Answer: A
A. A->B, if B is a subset of A
B. A->A
C. B->B
Answer: D
Q25. ______ on relational databases can be determined by using Armstrong's axioms.
A. Functional Independencies
B. Functional Dependencies
C. Fractional Independencies
D. Fraction Dependencies
Answer: B
Q26.Given an array int x[5][5] with starting address 6000 stored in row-major ordering.calculate the
address of x[3][4].
A. 6040
B. 6038
C. 6042
D. 6098
ANSWER: B
Q27. As part of maintenance work, you are entrusted with the work of rearranging the library books in a
shelf in proper order, at the end of each day. The ideal choice will be?
A. Insertion sort
B. Selection sort
C. Heap sort
D. Bubble sort
ANSWER: A
Q28. Which of the following header files must necessarily be included to use dynamic memory allocation
functions?
A. stdlib.h
B. stdio.h
C. memory.h
D. dos.h
Answer: A
Q29. Which of the following is an example for non linear data type?
A. Tree
B. Array
C. Linked list
D. Queue
Answer: A
Answer: A
A.1NF
B.2NF
C.3NF
D.BCNF
Answer: A
A. Transition Dependency
B. No Transition Dependency
C. Relational Dependency
D. No Relational Dependency
Answer: B
B.A table attribute cannot contain more than one value, according to this rule.
Answers: D
Q34.Non-prime attributes cannot be transitively dependent, so the relation must have the ___ normal
form.
A. First
B. Second
C. Third
D. Fourth
Answer: C
C→F E→A EC → D A → B
A. CD
B. EC
C. AE
D. AC
Answer: B
Q36.Find all the candidate keys of the relation R(A,B,C,D,E) with functional dependency
F={A-->B,AC-->D,D-->E, E-->A}
A. AC,CD,CE
B. AD,BD,CD
C. A,B,C
D. E,D,AB
Answer: A
void main()
int x=10;
printf(“%d”,++(x+5));
A) error
B) 15
C) 16
D) 17
ANS: A
#include <stdio.h>
int main()
int a = 10, b = 5, c = 3;
b != !a;
c = !!a;
printf("%d\t%d", b, C);
A) 5 1
B) 0 3
C) 5 3
D) 1 1
ANS: A
void main()
int i = 0, j = 1, k = 2, m;
A. 1 1 2 3
B. 1 1 2 2
C. 0 1 2 2
D. 0 1 2 3
Answer: B
Q40.Suppose we’re debugging a quicksort implementation that is supposed to sort an array in ascending
order. After the first partition step has been completed, the contents of the array are in the following
order: 3 9 1 14 17 24 22 20 Which of the following statements is correct about the partition step?
B. The pivot could have been 14, but could not have been 17
C. The pivot could have been 17, but could not have been 14 3.
D. Neither 14 nor 17 could have been the pivot
Answer: A
A. Insertion sort
B. Heap sort
C. Bubble sort
D. Quick sort
A) a = 10
B) a = 14.867
C) a = 14
D) compiler error.
int main()
int a = 25%10;
printf("%d", a);
return 0;
A) 2.5
B) 2
C) 5
D) Compiler error.
Q44.What is the output of the C statement.?
int main()
int a=0;
a = 5<2 ? 4 : 3;
printf("%d",a);
return 0;
A) 4
B) 3
C) 5
D) 2
int main()
int k;
break;
}
return 0;
A) Compiler error
B) FLOWER FRUITS
C) FLOWER YELLOW
Answer: C
Q46. What is the way to suddenly come out of or quit any Loop in C Language.?
A) continue; statement
B) break; statement
C) leave; statement
D) quit; statement
Answer: B
Q47. Consider the relation scheme R(A, B, C, D, E, H) and the set of functional dependencies-
A→B
BC → D
E→C
D→A
A. AE, BE
B. AE, BE, DE
ANSWER: D
(B) Attribute
(C) Tuple
(D) Domain
Answer: A
Answer: B
(A) First
(B) Second
(C) Third
(D) BCNF
Answer: B
Answer: D
(A) First
(B) Second
(C) Third
(D) Fourth
Answer : D
Q53. The attribute that can be divided into other attributes is called
Answer: B
Answer: D
(A) Superkey
(B) Domain
(C) Attribute
(D) Schema
Answer: A
Q56. If every non-key attribute is functionally dependent on the primary key, the relation will be in
(A) First Normal Form
Answer: C
(B) Unique
(C) Option A or B
Answer: D
(A) Table
(B) Schema
(C) Relation
Answer: C
Answer: A
C. Any dependent of FD
Answer: B