Code No: 05321203 Set No. 1
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
IV B.Tech. I Sem., II Mid-Term Examinations, Oct./Nov. – 2009
DATA WAREHOUSING & DATA MINING
Objective Exam
Name: ______________________________ Hall Ticket No.
Answer All Questions. All Questions Carry Equal Marks.Time: 20 Min. Marks: 20.
A
I. Choose the correct alternative:
1. Which step in Apriori algorithm uses apriori property? [ ]
(a) join step (b) prune step (c) candidate generation step (d) query processing
2. Which technique can be used to reduce the size of the candidate k-itemsets in Apriori algorithm?
[ ]
a) pruning (b) cleaning (c) hash based (d) partitioning
3. Classification belongs to which type of learning? [ ]
(a) supervised (b) unsupervised (c) rote (d) machine
4. What kind of attributes does log linear model require? [ ]
(a) categorical (b) continuous (c) binary (d) ordinal
5. Which among the following is a accuracy measure of classifier? [ ]
(a) support (b) confidence (c) specificity (d) recall
6. Which algorithm mines frequent itemsets without candidate generation? [ ]
a) apriori b) FP tree c) FP growth d) maxpattern
7. What kind of analysis is used to access the impact of an input variable on a network output?[ ]
(a) component analysis (b) sensitivity analysis (c) output analysis (d) jackknife analysis
8. Which of the following is a lazy learner for classification? [ ]
(a) nearest neighbor (b) back propagation
(c) decision tree induction (d) genetic algorithm
9. Which is not an accuracy measure for classifier? [ ]
(a) sensitivity (b) precision (c) specificity (d) recall
10. In a term frequency matrix, what does each column represent? [ ]
a) term b) document vector c) number of term occurences d) words
Cont…2
Code No: 05321203 -2- Set No. 1
II. Fill in the blanks:
11. Association rules are considered interesting if they satisfy both______ & ______ thresholds.
12. If a rule concerns associations between the presence or absence of items, it is ______ rule.
13. Apriori can be applied to improve the efficiency of answering ____ queries.
14. FP growth algorithm adopts_________ strategy of algorithm design process.
15. ______ variables are continuous measurements of a roughly linear scale.
16. A typical example of association rule mining is _______.
17. _________ is a frequent patterns whose proper super pattern is not frequent.
18. Manhattan distance is defined as d(i, j) = _________.
19. An interesting mining optimization method can be adopted in spatial association analysis. This method is called as____________.
20. _________ is the percentage of retrieved documents that are infact relevant to the query.
-oOo-
Code No: 05321203 Set No. 2
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
IV B.Tech. I Sem., II Mid-Term Examinations, Oct./Nov. – 2009
DATA WAREHOUSING & DATA MINING
Objective Exam
Name: ______________________________ Hall Ticket No.
Answer All Questions. All Questions Carry Equal Marks.Time: 20 Min. Marks: 20.
A
I. Choose the correct alternative:
1. What kind of attributes does log linear model require? [ ]
(a) categorical (b) continuous (c) binary (d) ordinal
2. Which among the following is a accuracy measure of classifier? [ ]
(a) support (b) confidence (c) specificity (d) recall
3. Which algorithm mines frequent itemsets without candidate generation? [ ]
a) apriori b) FP tree c) FP growth d) maxpattern
4. What kind of analysis is used to access the impact of an input variable on a network output?[ ]
(a) component analysis (b) sensitivity analysis (c) output analysis (d) jackknife analysis
5. Which of the following is a lazy learner for classification? [ ]
(a) nearest neighbor (b) back propagation
(c) decision tree induction (d) genetic algorithm
6. Which is not an accuracy measure for classifier? [ ]
(a) sensitivity (b) precision (c) specificity (d) recall
7. In a term frequency matrix, what does each column represent? [ ]
a) term b) document vector c) number of term occurences d) words
8. Which step in Apriori algorithm uses apriori property? [ ]
(a) join step (b) prune step (c) candidate generation step (d) query processing
9. Which technique can be used to reduce the size of the candidate k-itemsets in Apriori algorithm?
[ ]
a) pruning (b) cleaning (c) hash based (d) partitioning
10. Classification belongs to which type of learning? [ ]
(a) supervised (b) unsupervised (c) rote (d) machine
Cont…2
Code No: 05321203 -2- Set No. 2
II. Fill in the blanks:
11. FP growth algorithm adopts_________ strategy of algorithm design process.
12. ______ variables are continuous measurements of a roughly linear scale.
13. A typical example of association rule mining is _______.
14. _________ is a frequent patterns whose proper super pattern is not frequent.
15. Manhattan distance is defined as d(i, j) = _________.
16. An interesting mining optimization method can be adopted in spatial association analysis. This method is called as____________.
17. _________ is the percentage of retrieved documents that are infact relevant to the query.
18. Association rules are considered interesting if they satisfy both______ & ______ thresholds.
19. If a rule concerns associations between the presence or absence of items, it is ______ rule.
20. Apriori can be applied to improve the efficiency of answering ____ queries.
-oOo-
Code No: 05321203 Set No. 3
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
IV B.Tech. I Sem., II Mid-Term Examinations, Oct./Nov. – 2009
DATA WAREHOUSING & DATA MINING
Objective Exam
Name: ______________________________ Hall Ticket No.
Answer All Questions. All Questions Carry Equal Marks.Time: 20 Min. Marks: 20.
A
I. Choose the correct alternative:
1. Which algorithm mines frequent itemsets without candidate generation? [ ]
a) apriori b) FP tree c) FP growth d) maxpattern
2. What kind of analysis is used to access the impact of an input variable on a network output?[ ]
(a) component analysis (b) sensitivity analysis (c) output analysis (d) jackknife analysis
3. Which of the following is a lazy learner for classification? [ ]
(a) nearest neighbor (b) back propagation
(c) decision tree induction (d) genetic algorithm
4. Which is not an accuracy measure for classifier? [ ]
(a) sensitivity (b) precision (c) specificity (d) recall
5. In a term frequency matrix, what does each column represent? [ ]
a) term b) document vector c) number of term occurences d) words
6. Which step in Apriori algorithm uses apriori property? [ ]
(a) join step (b) prune step (c) candidate generation step (d) query processing
7. Which technique can be used to reduce the size of the candidate k-itemsets in Apriori algorithm?
[ ]
a) pruning (b) cleaning (c) hash based (d) partitioning
8. Classification belongs to which type of learning? [ ]
(a) supervised (b) unsupervised (c) rote (d) machine
9. What kind of attributes does log linear model require? [ ]
(a) categorical (b) continuous (c) binary (d) ordinal
10. Which among the following is a accuracy measure of classifier? [ ]
(a) support (b) confidence (c) specificity (d) recall
Cont…2
Code No: 05321203 -2- Set No. 3
II. Fill in the blanks:
11. A typical example of association rule mining is _______.
12. _________ is a frequent patterns whose proper super pattern is not frequent.
13. Manhattan distance is defined as d(i, j) = _________.
14. An interesting mining optimization method can be adopted in spatial association analysis. This method is called as____________.
15. _________ is the percentage of retrieved documents that are infact relevant to the query.
16. Association rules are considered interesting if they satisfy both______ & ______ thresholds.
17. If a rule concerns associations between the presence or absence of items, it is ______ rule.
18. Apriori can be applied to improve the efficiency of answering ____ queries.
19. FP growth algorithm adopts_________ strategy of algorithm design process.
20. ______ variables are continuous measurements of a roughly linear scale.
-oOo-
Code No: 05321203 Set No. 4
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
IV B.Tech. I Sem., II Mid-Term Examinations, Oct./Nov. – 2009
DATA WAREHOUSING & DATA MINING
Objective Exam
Name: ______________________________ Hall Ticket No.
Answer All Questions. All Questions Carry Equal Marks.Time: 20 Min. Marks: 20.
A
I. Choose the correct alternative:
1. Which of the following is a lazy learner for classification? [ ]
(a) nearest neighbor (b) back propagation
(c) decision tree induction (d) genetic algorithm
2. Which is not an accuracy measure for classifier? [ ]
(a) sensitivity (b) precision (c) specificity (d) recall
3. In a term frequency matrix, what does each column represent? [ ]
a) term b) document vector c) number of term occurences d) words
4. Which step in Apriori algorithm uses apriori property? [ ]
(a) join step (b) prune step (c) candidate generation step (d) query processing
5. Which technique can be used to reduce the size of the candidate k-itemsets in Apriori algorithm?
[ ]
a) pruning (b) cleaning (c) hash based (d) partitioning
6. Classification belongs to which type of learning? [ ]
(a) supervised (b) unsupervised (c) rote (d) machine
7. What kind of attributes does log linear model require? [ ]
(a) categorical (b) continuous (c) binary (d) ordinal
8. Which among the following is a accuracy measure of classifier? [ ]
(a) support (b) confidence (c) specificity (d) recall
9. Which algorithm mines frequent itemsets without candidate generation? [ ]
a) apriori b) FP tree c) FP growth d) maxpattern
10. What kind of analysis is used to access the impact of an input variable on a network output?[ ]
(a) component analysis (b) sensitivity analysis (c) output analysis (d) jackknife analysis
Cont…2
Code No: 05321203 -2- Set No. 4
II. Fill in the blanks:
11. Manhattan distance is defined as d(i, j) = _________.
12. An interesting mining optimization method can be adopted in spatial association analysis. This method is called as____________.
13. _________ is the percentage of retrieved documents that are infact relevant to the query.
14. Association rules are considered interesting if they satisfy both______ & ______ thresholds.
15. If a rule concerns associations between the presence or absence of items, it is ______ rule.
16. Apriori can be applied to improve the efficiency of answering ____ queries.
17. FP growth algorithm adopts_________ strategy of algorithm design process.
18. ______ variables are continuous measurements of a roughly linear scale.
19. A typical example of association rule mining is _______.
20. _________ is a frequent patterns whose proper super pattern is not frequent.
-oOo-
Friday, November 20, 2009
DBMS ONLINE BITS
Code No: 07A5EC15 Set No. 1
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
III B.Tech. I Sem., II Mid-Term Examinations, November– 2009
DATA BASE MANAGEMENT SYSTEMS Objective Exam
Name: ______________________________ Hall Ticket No.
Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 20.
I. Choose the correct alternative:
1. First normal form states that [ ]
a) Primary key fields should contain only atomic values.
b) Non-key fields should contain only atomic values.
c) Every field should contain only atomic values.
d) All the above.
2. Fan-out of the tree is [ ]
a) The average number of children of a root node.
b) The average number of children of a non leaf node.
c) The average number of children of a leaf node.
d) The average number of children of all node.
3. The transaction identifier field of an update log record is. [ ]
a) The unique identifier of the transaction that performed write operation.
b) The unique identifier of the data item written.
c) The value of the data item prior to the write.
d) All the above.
4. In hash based indexing, a bucket consists of [ ]
a) A primary page. b) Pages linked in chain
c) Both a& b d)None.
5. When a file is organized so that the ordering of data records is same as or close to the ordering of data entries in same index, then the index is [ ]
a) Unclustered. b) Clustered. c) Both a & b. d) None.
6. Shadow paging technique maintains the following tables for crash-recovery [ ]
a) Page table & shadow page table.
b) Current page table & shadow page table.
c) Shadow page table.
d) Page table, shadow page table &Current page table.
7. Define page I/O [ ]
a) Input from disk to main memory.
b) Input from main memory to disk.
c) Output from disk to main memory and Input from main memory to disk
d) Input from disk to main memory and Output from main memory to disk.
Cont……[2]
A
[2]
Code No: 07A5EC15 Set No. 1
8. In hash based indexing, a hash function applied to the search key is used to find [ ]
a) Bucket number. b)Primary page. c) Record. d) A page.
9. A primary index is [ ]
a) An index on a set of fields that includes the Candidate Key.
b) An index on a set of fields that excludes the Candidate key.
c) An index on a set of fields that includes the Primary key.
d) An index on a set of fields that excludes all the key attributes.
10. For a FD X->Y, if some attribute A€X can be removed from X and the dependency still holds then it is
[ ]
a) Full Functional Dependency. b) Trivial FD. c) Partial FD. d) Multivalued FD.
II. Fill in the Blanks:
11. If every non prime attribute A in R is fully functionally dependent on the primary key attribute of R, then R is said to be in _________________
12. If X->Y is an FD and there exists a set of attributes Z that is neither a key nor a subset of any key of R and both X->Y and Z->y hold, then it is ____________
13. The unit of information read from or written to disk is_____________
14. In tree-based Indexing, the actual data is stored at _________________
15. Properties of a transaction are ______________, ______________, ___________, Durability.
16. After the transaction has been rolled back and the Database has been restored to its state prior to the start of the transaction is the _____________ state of a transaction.
17. In __________________ mode a transaction Ti on an item Q, can read, but cannot write Q.
18. The Log is a sequence of ____________, recording all the update activities in the Database.
19. ______________ is a checkpoint where transactions are allowed to perform updates even while buffer blocks are being written out.
20. A data structure that organizes data records on disk to optimize certain kinds of retrieval operation is __________________.
-oOo-
Code No: 07A5EC15 Set No. 2
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
III B.Tech. I Sem., II Mid-Term Examinations, November– 2009
DATA BASE MANAGEMENT SYSTEMS Objective Exam
Name: ______________________________ Hall Ticket No.
Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 20.
I. Choose the correct alternative:
1. In hash based indexing, a bucket consists of [ ]
a. A primary page. b. Pages linked in chain c. Both a& b d. None.
2. When a file is organized so that the ordering of data records is same as or close to the ordering of data
entries in same index, then the index is [ ]
a. Unclustered. b. Clustered. c. Both a & b. d.None.
3. Shadow paging technique maintains the following tables for crash-recovery [ ]
a. Page table & shadow page table.
b.Current page table & shadow page table.
c. Shadow page table.
d.Page table, shadow page table &Current page table.
4. Define page I/O [ ]
a. Input from disk to main memory.
b. Input from main memory to disk.
c. Output from disk to main memory and Input from main memory to disk
d .Input from disk to main memory and Output from main memory to disk.
5. In hash based indexing, a hash function applied to the search key is used to find [ ]
a.Bucket number. b.Primary page. c.Record. d.A page.
6. A primary index is [ ]
a. An index on a set of fields that includes the Candidate Key.
b. An index on a set of fields that excludes the Candidate key.
c. An index on a set of fields that includes the Primary key.
d. An index on a set of fields that excludes all the key attributes.
7. For a FD X->Y, if some attribute A€X can be removed from X and the dependency still holds then it is
[ ]
a. Full Functional Dependency. b. Trivial FD. c. Partial FD. d. Multivalued FD.
8. First normal form states that [ ]
a. Primary key fields should contain only atomic values.
b. Non-key fields should contain only atomic values.
c. Every field should contain only atomic values.
d. All the above.
Cont……[2]
A
[2]
Code No: 07A5EC15 Set No. 2
9. Fan-out of the tree is [ ]
a. The average number of children of a root node.
b. The average number of children of a non leaf node.
c. The average number of children of a leaf node.
d. The average number of children of all node.
10. The transaction identifier field of an update log record is. [ ]
a. The unique identifier of the transaction that performed write operation.
b. The unique identifier of the data item written.
c. The value of the data item prior to the write.
b. All the above.
II. Fill in the Blanks:
11. In tree-based Indexing, the actual data is stored at _________________
12. Properties of a transaction are ______________, ______________, ___________, Durability.
13. After the transaction has been rolled back and the Database has been restored to its state prior to the start
of the transaction is the _____________ state of a transaction.
14. In __________________ mode a transaction Ti on an item Q, can read, but cannot write Q.
15. The Log is a sequence of ____________, recording all the update activities in the Database.
16. ______________ is a checkpoint where transactions are allowed to perform updates even while buffer
blocks are being written out.
17. A data structure that organizes data records on disk to optimize certain kinds of retrieval operation is
_________________.
18. If every non prime attribute A in R is fully functionally dependent on the primary key attribute of R, then
R is said to be in _________________
19. If X->Y is an FD and there exists a set of attributes Z that is neither a key nor a subset of any key of R
and both X->Y and Z->y hold, then it is ____________
20. The unit of information read from or written to disk is_____________
-oOo-
Code No: 07A5EC15 Set No. 3
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
III B.Tech. I Sem., II Mid-Term Examinations, November– 2009
DATA BASE MANAGEMENT SYSTEMS Objective Exam
Name: ______________________________ Hall Ticket No.
Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 20.
I. Choose the correct alternative:
1. When a file is organized so that the ordering of data records is same as or close to the ordering of data
entries in same index, then the index is [ ]
a. Unclustered. b. Clustered. c. Both a & b. d.None.
2. Shadow paging technique maintains the following tables for crash-recovery [ ]
a. Page table & shadow page table.
b. Current page table & shadow page table.
c. Shadow page table.
d. Page table, shadow page table &Current page table.
3. Define page I/O [ ]
a. Input from disk to main memory.
b. Input from main memory to disk.
c. Output from disk to main memory and Input from main memory to disk
d. Input from disk to main memory and Output from main memory to disk.
4. In hash based indexing, a hash function applied to the search key is used to find [ ]
a. Bucket number. b. Primary page. c. Record. d. A page.
5. A primary index is [ ]
a. An index on a set of fields that includes the Candidate Key.
b. An index on a set of fields that excludes the Candidate key.
c. An index on a set of fields that includes the Primary key.
d. An index on a set of fields that excludes all the key attributes.
6. For a FD X->Y, if some attribute A€X can be removed from X and the dependency still holds then it is
[ ]
a. Full Functional Dependency. b. Trivial FD. c. Partial FD. d. Multivalued FD.
7. First normal form states that [ ]
a. Primary key fields should contain only atomic values.
b. Non-key fields should contain only atomic values.
c. Every field should contain only atomic values.
d. All the above.
Cont……[2]
A
[2]
Code No: 07A5EC15 Set No. 3
8. Fan-out of the tree is [ ]
a. The average number of children of a root node.
b. The average number of children of a non leaf node.
c. The average number of children of a leaf node.
d. The average number of children of all node.
9. The transaction identifier field of an update log record is. [ ]
a. The unique identifier of the transaction that performed write operation.
b. The unique identifier of the data item written.
c. The value of the data item prior to the write.
d. All the above.
10. In hash based indexing, a bucket consists of [ ]
a. A primary page. b. Pages linked in chain c. Both a& b d. None.
II. Fill in the Blanks:
11. After the transaction has been rolled back and the Database has been restored to its state prior to the start
of the transaction is the _____________ state of a transaction.
12. In __________________ mode a transaction Ti on an item Q, can read, but cannot write Q.
13. The Log is a sequence of ____________, recording all the update activities in the Database.
14. ______________ is a checkpoint where transactions are allowed to perform updates even while buffer
blocks are being written out.
15. A data structure that organizes data records on disk to optimize certain kinds of retrieval operation is
__________________.
16. If every non prime attribute A in R is fully functionally dependent on the primary key attribute of R, then
R is said to be in _________________
17. If X->Y is an FD and there exists a set of attributes Z that is neither a key nor a subset of any key of R
and both X->Y and Z->y hold, then it is ____________
18. The unit of information read from or written to disk is_____________
19. In tree-based Indexing, the actual data is stored at _________________
20. Properties of a transaction are ______________, ______________, ___________, Durability.
-oOo-
Code No: 07A5EC15 Set No. 4
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
III B.Tech. I Sem., II Mid-Term Examinations, November– 2009
DATA BASE MANAGEMENT SYSTEMS Objective Exam
Name: ______________________________ Hall Ticket No.
Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 20.
I. Choose the correct alternative:
1. In hash based indexing, a hash function applied to the search key is used to find [ ]
a. Bucket number. b. Primary page. c. Record. d. A page.
2. A primary index is [ ]
a. An index on a set of fields that includes the Candidate Key.
b. An index on a set of fields that excludes the Candidate key.
c. An index on a set of fields that includes the Primary key.
d. An index on a set of fields that excludes all the key attributes.
3. For a FD X->Y, if some attribute A€X can be removed from X and the dependency still holds then it is
[ ]
a. Full Functional Dependency. b. Trivial FD. c. Partial FD. d. Multivalued FD.
4. First normal form states that [ ]
a. Primary key fields should contain only atomic values.
b. Non-key fields should contain only atomic values.
c. Every field should contain only atomic values.
d. All the above.
5. Fan-out of the tree is [ ]
a. The average number of children of a root node.
b. The average number of children of a non leaf node.
c. The average number of children of a leaf node.
d. The average number of children of all node.
6. The transaction identifier field of an update log record is. [ ]
a. The unique identifier of the transaction that performed write operation.
b. The unique identifier of the data item written.
c. The value of the data item prior to the write.
d. All the above.
7. In hash based indexing, a bucket consists of [ ]
a. A primary page. b. Pages linked in chain c. Both a& b d. None.
8. When a file is organized so that the ordering of data records is same as or close to the ordering of data
entries in same index, then the index is [ ]
a. Unclustered. b. Clustered. c. Both a & b. d.None.
Cont……[2]
A
[2]
Code No: 07A5EC15 Set No. 4
9. Shadow paging technique maintains the following tables for crash-recovery [ ]
a. Page table & shadow page table.
b. Current page table & shadow page table.
c. Shadow page table.
d. Page table, shadow page table &Current page table.
10. Define page I/O [ ]
a. Input from disk to main memory.
b. Input from main memory to disk.
c. Output from disk to main memory and Input from main memory to disk
d. Input from disk to main memory and Output from main memory to disk.
II. Fill in the Blanks:
11. The Log is a sequence of ____________, recording all the update activities in the Database.
12. ______________ is a checkpoint where transactions are allowed to perform updates even while buffer
blocks are being written out.
13. A data structure that organizes data records on disk to optimize certain kinds of retrieval operation is
__________________.
14. If every non prime attribute A in R is fully functionally dependent on the primary key attribute of R, then
R is said to be in _________________
15. If X->Y is an FD and there exists a set of attributes Z that is neither a key nor a subset of any key of R
and both X->Y and Z->y hold, then it is ____________
16. The unit of information read from or written to disk is_____________
17. In tree-based Indexing, the actual data is stored at _________________
18. Properties of a transaction are ______________, ______________, ___________, Durability.
19. After the transaction has been rolled back and the Database has been restored to its state prior to the start
of the transaction is the _____________ state of a transaction.
20. In __________________ mode a transaction Ti on an item Q, can read, but cannot write Q.
-oOo-
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
III B.Tech. I Sem., II Mid-Term Examinations, November– 2009
DATA BASE MANAGEMENT SYSTEMS Objective Exam
Name: ______________________________ Hall Ticket No.
Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 20.
I. Choose the correct alternative:
1. First normal form states that [ ]
a) Primary key fields should contain only atomic values.
b) Non-key fields should contain only atomic values.
c) Every field should contain only atomic values.
d) All the above.
2. Fan-out of the tree is [ ]
a) The average number of children of a root node.
b) The average number of children of a non leaf node.
c) The average number of children of a leaf node.
d) The average number of children of all node.
3. The transaction identifier field of an update log record is. [ ]
a) The unique identifier of the transaction that performed write operation.
b) The unique identifier of the data item written.
c) The value of the data item prior to the write.
d) All the above.
4. In hash based indexing, a bucket consists of [ ]
a) A primary page. b) Pages linked in chain
c) Both a& b d)None.
5. When a file is organized so that the ordering of data records is same as or close to the ordering of data entries in same index, then the index is [ ]
a) Unclustered. b) Clustered. c) Both a & b. d) None.
6. Shadow paging technique maintains the following tables for crash-recovery [ ]
a) Page table & shadow page table.
b) Current page table & shadow page table.
c) Shadow page table.
d) Page table, shadow page table &Current page table.
7. Define page I/O [ ]
a) Input from disk to main memory.
b) Input from main memory to disk.
c) Output from disk to main memory and Input from main memory to disk
d) Input from disk to main memory and Output from main memory to disk.
Cont……[2]
A
[2]
Code No: 07A5EC15 Set No. 1
8. In hash based indexing, a hash function applied to the search key is used to find [ ]
a) Bucket number. b)Primary page. c) Record. d) A page.
9. A primary index is [ ]
a) An index on a set of fields that includes the Candidate Key.
b) An index on a set of fields that excludes the Candidate key.
c) An index on a set of fields that includes the Primary key.
d) An index on a set of fields that excludes all the key attributes.
10. For a FD X->Y, if some attribute A€X can be removed from X and the dependency still holds then it is
[ ]
a) Full Functional Dependency. b) Trivial FD. c) Partial FD. d) Multivalued FD.
II. Fill in the Blanks:
11. If every non prime attribute A in R is fully functionally dependent on the primary key attribute of R, then R is said to be in _________________
12. If X->Y is an FD and there exists a set of attributes Z that is neither a key nor a subset of any key of R and both X->Y and Z->y hold, then it is ____________
13. The unit of information read from or written to disk is_____________
14. In tree-based Indexing, the actual data is stored at _________________
15. Properties of a transaction are ______________, ______________, ___________, Durability.
16. After the transaction has been rolled back and the Database has been restored to its state prior to the start of the transaction is the _____________ state of a transaction.
17. In __________________ mode a transaction Ti on an item Q, can read, but cannot write Q.
18. The Log is a sequence of ____________, recording all the update activities in the Database.
19. ______________ is a checkpoint where transactions are allowed to perform updates even while buffer blocks are being written out.
20. A data structure that organizes data records on disk to optimize certain kinds of retrieval operation is __________________.
-oOo-
Code No: 07A5EC15 Set No. 2
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
III B.Tech. I Sem., II Mid-Term Examinations, November– 2009
DATA BASE MANAGEMENT SYSTEMS Objective Exam
Name: ______________________________ Hall Ticket No.
Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 20.
I. Choose the correct alternative:
1. In hash based indexing, a bucket consists of [ ]
a. A primary page. b. Pages linked in chain c. Both a& b d. None.
2. When a file is organized so that the ordering of data records is same as or close to the ordering of data
entries in same index, then the index is [ ]
a. Unclustered. b. Clustered. c. Both a & b. d.None.
3. Shadow paging technique maintains the following tables for crash-recovery [ ]
a. Page table & shadow page table.
b.Current page table & shadow page table.
c. Shadow page table.
d.Page table, shadow page table &Current page table.
4. Define page I/O [ ]
a. Input from disk to main memory.
b. Input from main memory to disk.
c. Output from disk to main memory and Input from main memory to disk
d .Input from disk to main memory and Output from main memory to disk.
5. In hash based indexing, a hash function applied to the search key is used to find [ ]
a.Bucket number. b.Primary page. c.Record. d.A page.
6. A primary index is [ ]
a. An index on a set of fields that includes the Candidate Key.
b. An index on a set of fields that excludes the Candidate key.
c. An index on a set of fields that includes the Primary key.
d. An index on a set of fields that excludes all the key attributes.
7. For a FD X->Y, if some attribute A€X can be removed from X and the dependency still holds then it is
[ ]
a. Full Functional Dependency. b. Trivial FD. c. Partial FD. d. Multivalued FD.
8. First normal form states that [ ]
a. Primary key fields should contain only atomic values.
b. Non-key fields should contain only atomic values.
c. Every field should contain only atomic values.
d. All the above.
Cont……[2]
A
[2]
Code No: 07A5EC15 Set No. 2
9. Fan-out of the tree is [ ]
a. The average number of children of a root node.
b. The average number of children of a non leaf node.
c. The average number of children of a leaf node.
d. The average number of children of all node.
10. The transaction identifier field of an update log record is. [ ]
a. The unique identifier of the transaction that performed write operation.
b. The unique identifier of the data item written.
c. The value of the data item prior to the write.
b. All the above.
II. Fill in the Blanks:
11. In tree-based Indexing, the actual data is stored at _________________
12. Properties of a transaction are ______________, ______________, ___________, Durability.
13. After the transaction has been rolled back and the Database has been restored to its state prior to the start
of the transaction is the _____________ state of a transaction.
14. In __________________ mode a transaction Ti on an item Q, can read, but cannot write Q.
15. The Log is a sequence of ____________, recording all the update activities in the Database.
16. ______________ is a checkpoint where transactions are allowed to perform updates even while buffer
blocks are being written out.
17. A data structure that organizes data records on disk to optimize certain kinds of retrieval operation is
_________________.
18. If every non prime attribute A in R is fully functionally dependent on the primary key attribute of R, then
R is said to be in _________________
19. If X->Y is an FD and there exists a set of attributes Z that is neither a key nor a subset of any key of R
and both X->Y and Z->y hold, then it is ____________
20. The unit of information read from or written to disk is_____________
-oOo-
Code No: 07A5EC15 Set No. 3
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
III B.Tech. I Sem., II Mid-Term Examinations, November– 2009
DATA BASE MANAGEMENT SYSTEMS Objective Exam
Name: ______________________________ Hall Ticket No.
Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 20.
I. Choose the correct alternative:
1. When a file is organized so that the ordering of data records is same as or close to the ordering of data
entries in same index, then the index is [ ]
a. Unclustered. b. Clustered. c. Both a & b. d.None.
2. Shadow paging technique maintains the following tables for crash-recovery [ ]
a. Page table & shadow page table.
b. Current page table & shadow page table.
c. Shadow page table.
d. Page table, shadow page table &Current page table.
3. Define page I/O [ ]
a. Input from disk to main memory.
b. Input from main memory to disk.
c. Output from disk to main memory and Input from main memory to disk
d. Input from disk to main memory and Output from main memory to disk.
4. In hash based indexing, a hash function applied to the search key is used to find [ ]
a. Bucket number. b. Primary page. c. Record. d. A page.
5. A primary index is [ ]
a. An index on a set of fields that includes the Candidate Key.
b. An index on a set of fields that excludes the Candidate key.
c. An index on a set of fields that includes the Primary key.
d. An index on a set of fields that excludes all the key attributes.
6. For a FD X->Y, if some attribute A€X can be removed from X and the dependency still holds then it is
[ ]
a. Full Functional Dependency. b. Trivial FD. c. Partial FD. d. Multivalued FD.
7. First normal form states that [ ]
a. Primary key fields should contain only atomic values.
b. Non-key fields should contain only atomic values.
c. Every field should contain only atomic values.
d. All the above.
Cont……[2]
A
[2]
Code No: 07A5EC15 Set No. 3
8. Fan-out of the tree is [ ]
a. The average number of children of a root node.
b. The average number of children of a non leaf node.
c. The average number of children of a leaf node.
d. The average number of children of all node.
9. The transaction identifier field of an update log record is. [ ]
a. The unique identifier of the transaction that performed write operation.
b. The unique identifier of the data item written.
c. The value of the data item prior to the write.
d. All the above.
10. In hash based indexing, a bucket consists of [ ]
a. A primary page. b. Pages linked in chain c. Both a& b d. None.
II. Fill in the Blanks:
11. After the transaction has been rolled back and the Database has been restored to its state prior to the start
of the transaction is the _____________ state of a transaction.
12. In __________________ mode a transaction Ti on an item Q, can read, but cannot write Q.
13. The Log is a sequence of ____________, recording all the update activities in the Database.
14. ______________ is a checkpoint where transactions are allowed to perform updates even while buffer
blocks are being written out.
15. A data structure that organizes data records on disk to optimize certain kinds of retrieval operation is
__________________.
16. If every non prime attribute A in R is fully functionally dependent on the primary key attribute of R, then
R is said to be in _________________
17. If X->Y is an FD and there exists a set of attributes Z that is neither a key nor a subset of any key of R
and both X->Y and Z->y hold, then it is ____________
18. The unit of information read from or written to disk is_____________
19. In tree-based Indexing, the actual data is stored at _________________
20. Properties of a transaction are ______________, ______________, ___________, Durability.
-oOo-
Code No: 07A5EC15 Set No. 4
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
III B.Tech. I Sem., II Mid-Term Examinations, November– 2009
DATA BASE MANAGEMENT SYSTEMS Objective Exam
Name: ______________________________ Hall Ticket No.
Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 20.
I. Choose the correct alternative:
1. In hash based indexing, a hash function applied to the search key is used to find [ ]
a. Bucket number. b. Primary page. c. Record. d. A page.
2. A primary index is [ ]
a. An index on a set of fields that includes the Candidate Key.
b. An index on a set of fields that excludes the Candidate key.
c. An index on a set of fields that includes the Primary key.
d. An index on a set of fields that excludes all the key attributes.
3. For a FD X->Y, if some attribute A€X can be removed from X and the dependency still holds then it is
[ ]
a. Full Functional Dependency. b. Trivial FD. c. Partial FD. d. Multivalued FD.
4. First normal form states that [ ]
a. Primary key fields should contain only atomic values.
b. Non-key fields should contain only atomic values.
c. Every field should contain only atomic values.
d. All the above.
5. Fan-out of the tree is [ ]
a. The average number of children of a root node.
b. The average number of children of a non leaf node.
c. The average number of children of a leaf node.
d. The average number of children of all node.
6. The transaction identifier field of an update log record is. [ ]
a. The unique identifier of the transaction that performed write operation.
b. The unique identifier of the data item written.
c. The value of the data item prior to the write.
d. All the above.
7. In hash based indexing, a bucket consists of [ ]
a. A primary page. b. Pages linked in chain c. Both a& b d. None.
8. When a file is organized so that the ordering of data records is same as or close to the ordering of data
entries in same index, then the index is [ ]
a. Unclustered. b. Clustered. c. Both a & b. d.None.
Cont……[2]
A
[2]
Code No: 07A5EC15 Set No. 4
9. Shadow paging technique maintains the following tables for crash-recovery [ ]
a. Page table & shadow page table.
b. Current page table & shadow page table.
c. Shadow page table.
d. Page table, shadow page table &Current page table.
10. Define page I/O [ ]
a. Input from disk to main memory.
b. Input from main memory to disk.
c. Output from disk to main memory and Input from main memory to disk
d. Input from disk to main memory and Output from main memory to disk.
II. Fill in the Blanks:
11. The Log is a sequence of ____________, recording all the update activities in the Database.
12. ______________ is a checkpoint where transactions are allowed to perform updates even while buffer
blocks are being written out.
13. A data structure that organizes data records on disk to optimize certain kinds of retrieval operation is
__________________.
14. If every non prime attribute A in R is fully functionally dependent on the primary key attribute of R, then
R is said to be in _________________
15. If X->Y is an FD and there exists a set of attributes Z that is neither a key nor a subset of any key of R
and both X->Y and Z->y hold, then it is ____________
16. The unit of information read from or written to disk is_____________
17. In tree-based Indexing, the actual data is stored at _________________
18. Properties of a transaction are ______________, ______________, ___________, Durability.
19. After the transaction has been rolled back and the Database has been restored to its state prior to the start
of the transaction is the _____________ state of a transaction.
20. In __________________ mode a transaction Ti on an item Q, can read, but cannot write Q.
-oOo-
automat and compiler design online bits
Code No: 07A5EC20 Set No. 1
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
III B.Tech. I Sem., II Mid-Term Examinations, November– 2009
AUTOMATA AND COMPILER DESIGN
Objective Exam
Name: ______________________________ Hall Ticket No.
A
Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 20.
I. Choose the correct alternative:
1.A sound type system eliminates _____,when the target program runs. [ ]
a)Type errors b)runtime errors c)compile type errors d)none
2. Implicit type conversions, is __________. [ ]
a)Done automatically by the compiler. b) Done automatically by the interpreter
c) Done automatically by the OS d) Done automatically by the language
3.____________ determines the type of a language construct from the way it is used. [ ]
a)Type synthesis b)Type inference c)Type reference d)None
4.A record is a data structure with ____________ [ ]
a)named fields b)fields c)named records d)records
5. Code Motion moves _____________. [ ]
a)Code outside a loop b)Code inside a loop c)Code top of a loop d)Code bottom of a loop.
6.Machine dependent optimization influenced by the _________ [ ]
a)Source machine b)Target machine c)Compiler d)Interpreter
7.An occurrence of an expression E is called a common sub expression if E is ___. [ ]
a)Previously computed and the values of E have not changed
b) Previously computed and the values of E will change
c) After computed and the values of E have not changed
d) After computed and the values of E will change
8. The code generator, produces the target program from the transformed ______. [ ]
a)High level code b)Low level code c) Intermediate code d)All the above
9. The line variable analysis is done by __________. [ ]
a)ud-chains b)du-chains c)computation of in and out d)All the above
10.Which is not an example for function-preserving transformation? [ ]
a)Copy propagation b)Flow of control c)Constant folding d)dead-code elimination
Cont…..[2]
[2]
Code No: 07A5EC20 Set No. 1
II. Fill in the Blanks:
11. Implicit type conversions also called ____________
12. The runtime representation of an object program in the logical address space consists of ___________.
13. The static data objects are created at ___________________.
14. The activations of procedures during the running of an entire program by a tree called _________.
15. The substitution of values for names whose values are constant is known as ______.
16. Activation records are sometimes called ______________.
17. If a transformation of a program performed by locking only at the statements in a basic blocks, called ________________.
18. The code improvement phase consists of _____________ followed by the application of transformation.
19. The replacement of an expressive operation by a cheaper one is called ________.
20. The relative address for a field name is relative to the __________ for that record.
-oOo-
Code No: 07A5EC20 Set No. 2
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
III B.Tech. I Sem., II Mid-Term Examinations, November– 2009
AUTOMATA AND COMPILER DESIGN
Objective Exam
Name: ______________________________ Hall Ticket No.
A
Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 20.
I. Choose the correct alternative:
1. A record is a data structure with ____________ [ ]
a)named fields b)fields c)named records d)records
2. Code Motion moves _____________. [ ]
a)Code outside a loop b)Code inside a loop c)Code top of a loop d)Code bottom of a loop.
3. Machine dependent optimization influenced by the _________ [ ]
a)Source machine b)Target machine c)Compiler d)Interpreter
4. An occurrence of an expression E is called a common sub expression if E is ___. [ ]
a)Previously computed and the values of E have not changed
b) Previously computed and the values of E will change
c) After computed and the values of E have not changed
d) After computed and the values of E will change
5. The code generator, produces the target program from the transformed ______. [ ]
a)High level code b)Low level code c) Intermediate code d)All the above
6. The line variable analysis is done by __________. [ ]
a)ud-chains b)du-chains c)computation of in and out d)All the above
7. Which is not an example for function-preserving transformation? [ ]
a)Copy propagation b)Flow of control c)Constant folding d)dead-code elimination
8. A sound type system eliminates _____,when the target program runs. [ ]
a)Type errors b)runtime errors c)compile type errors d)none
9. Implicit type conversions, is __________. [ ]
a)Done automatically by the compiler. b) Done automatically by the interpreter
c) Done automatically by the OS d) Done automatically by the language
10.____________ determines the type of a language construct from the way it is used. [ ]
a)Type synthesis b)Type inference c)Type reference d)None
Cont…..[2]
[2]
Code No: 07A5EC20 Set No. 2
II. Fill in the Blanks:
11. The activations of procedures during the running of an entire program by a tree called _________.
12. The substitution of values for names whose values are constant is known as ______.
13. Activation records are sometimes called ______________.
14. If a transformation of a program performed by locking only at the statements in a basic blocks, called ________________.
15. The code improvement phase consists of _____________ followed by the application of transformation.
16. The replacement of an expressive operation by a cheaper one is called ________.
17. The relative address for a field name is relative to the __________ for that record.
18. Implicit type conversions also called ____________
19. The runtime representation of an object program in the logical address space consists of ___________.
20. The static data objects are created at ___________________.
-oOo-
Code No: 07A5EC20 Set No. 3
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
III B.Tech. I Sem., II Mid-Term Examinations, November– 2009
AUTOMATA AND COMPILER DESIGN
Objective Exam
Name: ______________________________ Hall Ticket No.
A
Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 20.
I. Choose the correct alternative:
1. Machine dependent optimization influenced by the _________ [ ]
a)Source machine b)Target machine c)Compiler d)Interpreter
2. An occurrence of an expression E is called a common sub expression if E is ___. [ ]
a)Previously computed and the values of E have not changed
b) Previously computed and the values of E will change
c) After computed and the values of E have not changed
d) After computed and the values of E will change
3. The code generator, produces the target program from the transformed ______. [ ]
a)High level code b)Low level code c) Intermediate code d)All the above
4. The line variable analysis is done by __________. [ ]
a)ud-chains b)du-chains c)computation of in and out d)All the above
5. Which is not an example for function-preserving transformation? [ ]
a)Copy propagation b)Flow of control c)Constant folding d)dead-code elimination
6. A sound type system eliminates _____,when the target program runs. [ ]
a)Type errors b)runtime errors c)compile type errors d)none
7. Implicit type conversions, is __________. [ ]
a)Done automatically by the compiler. b) Done automatically by the interpreter
c) Done automatically by the OS d) Done automatically by the language
8.____________ determines the type of a language construct from the way it is used. [ ]
a)Type synthesis b)Type inference c)Type reference d)None
9. A record is a data structure with ____________ [ ]
a)named fields b)fields c)named records d)records
10. Code Motion moves _____________. [ ]
a)Code outside a loop b)Code inside a loop c)Code top of a loop d)Code bottom of a loop.
Cont…..[2]
[2]
Code No: 07A5EC20 Set No. 3
II. Fill in the Blanks:
11. Activation records are sometimes called ______________.
12. If a transformation of a program performed by locking only at the statements in a basic blocks, called ________________.
13. The code improvement phase consists of _____________ followed by the application of transformation.
14. The replacement of an expressive operation by a cheaper one is called ________.
15. The relative address for a field name is relative to the __________ for that record.
16. Implicit type conversions also called ____________
17. The runtime representation of an object program in the logical address space consists of ___________.
18. The static data objects are created at ___________________.
19. The activations of procedures during the running of an entire program by a tree called _________.
20. The substitution of values for names whose values are constant is known as ______.
-oOo-
Code No: 07A5EC20 Set No. 4
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
III B.Tech. I Sem., II Mid-Term Examinations, November– 2009
AUTOMATA AND COMPILER DESIGN
Objective Exam
Name: ______________________________ Hall Ticket No.
A
Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 20.
I. Choose the correct alternative:
1. The code generator, produces the target program from the transformed ______. [ ]
a)High level code b)Low level code c) Intermediate code d)All the above
2. The line variable analysis is done by __________. [ ]
a)ud-chains b)du-chains c)computation of in and out d)All the above
3. Which is not an example for function-preserving transformation? [ ]
a)Copy propagation b)Flow of control c)Constant folding d)dead-code elimination
4. A sound type system eliminates _____,when the target program runs. [ ]
a)Type errors b)runtime errors c)compile type errors d)none
5. Implicit type conversions, is __________. [ ]
a)Done automatically by the compiler. b) Done automatically by the interpreter
c) Done automatically by the OS d) Done automatically by the language
6.____________ determines the type of a language construct from the way it is used. [ ]
a)Type synthesis b)Type inference c)Type reference d)None
7. A record is a data structure with ____________ [ ]
a)named fields b)fields c)named records d)records
8. Code Motion moves _____________. [ ]
a)Code outside a loop b)Code inside a loop c)Code top of a loop d)Code bottom of a loop.
9. Machine dependent optimization influenced by the _________ [ ]
a)Source machine b)Target machine c)Compiler d)Interpreter
10. An occurrence of an expression E is called a common sub expression if E is ___. [ ]
a)Previously computed and the values of E have not changed
b) Previously computed and the values of E will change
c) After computed and the values of E have not changed
d) After computed and the values of E will change
Cont…..[2]
[2]
Code No: 07A5EC20 Set No. 4
II. Fill in the Blanks:
11. The code improvement phase consists of _____________ followed by the application of transformation.
12. The replacement of an expressive operation by a cheaper one is called ________.
13. The relative address for a field name is relative to the __________ for that record.
14. Implicit type conversions also called ____________
15. The runtime representation of an object program in the logical address space consists of ___________.
16. The static data objects are created at ___________________.
17. The activations of procedures during the running of an entire program by a tree called _________.
18. The substitution of values for names whose values are constant is known as ______.
19. Activation records are sometimes called ______________.
20. If a transformation of a program performed by locking only at the statements in a basic blocks, called ________________.
-oOo-
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
III B.Tech. I Sem., II Mid-Term Examinations, November– 2009
AUTOMATA AND COMPILER DESIGN
Objective Exam
Name: ______________________________ Hall Ticket No.
A
Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 20.
I. Choose the correct alternative:
1.A sound type system eliminates _____,when the target program runs. [ ]
a)Type errors b)runtime errors c)compile type errors d)none
2. Implicit type conversions, is __________. [ ]
a)Done automatically by the compiler. b) Done automatically by the interpreter
c) Done automatically by the OS d) Done automatically by the language
3.____________ determines the type of a language construct from the way it is used. [ ]
a)Type synthesis b)Type inference c)Type reference d)None
4.A record is a data structure with ____________ [ ]
a)named fields b)fields c)named records d)records
5. Code Motion moves _____________. [ ]
a)Code outside a loop b)Code inside a loop c)Code top of a loop d)Code bottom of a loop.
6.Machine dependent optimization influenced by the _________ [ ]
a)Source machine b)Target machine c)Compiler d)Interpreter
7.An occurrence of an expression E is called a common sub expression if E is ___. [ ]
a)Previously computed and the values of E have not changed
b) Previously computed and the values of E will change
c) After computed and the values of E have not changed
d) After computed and the values of E will change
8. The code generator, produces the target program from the transformed ______. [ ]
a)High level code b)Low level code c) Intermediate code d)All the above
9. The line variable analysis is done by __________. [ ]
a)ud-chains b)du-chains c)computation of in and out d)All the above
10.Which is not an example for function-preserving transformation? [ ]
a)Copy propagation b)Flow of control c)Constant folding d)dead-code elimination
Cont…..[2]
[2]
Code No: 07A5EC20 Set No. 1
II. Fill in the Blanks:
11. Implicit type conversions also called ____________
12. The runtime representation of an object program in the logical address space consists of ___________.
13. The static data objects are created at ___________________.
14. The activations of procedures during the running of an entire program by a tree called _________.
15. The substitution of values for names whose values are constant is known as ______.
16. Activation records are sometimes called ______________.
17. If a transformation of a program performed by locking only at the statements in a basic blocks, called ________________.
18. The code improvement phase consists of _____________ followed by the application of transformation.
19. The replacement of an expressive operation by a cheaper one is called ________.
20. The relative address for a field name is relative to the __________ for that record.
-oOo-
Code No: 07A5EC20 Set No. 2
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
III B.Tech. I Sem., II Mid-Term Examinations, November– 2009
AUTOMATA AND COMPILER DESIGN
Objective Exam
Name: ______________________________ Hall Ticket No.
A
Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 20.
I. Choose the correct alternative:
1. A record is a data structure with ____________ [ ]
a)named fields b)fields c)named records d)records
2. Code Motion moves _____________. [ ]
a)Code outside a loop b)Code inside a loop c)Code top of a loop d)Code bottom of a loop.
3. Machine dependent optimization influenced by the _________ [ ]
a)Source machine b)Target machine c)Compiler d)Interpreter
4. An occurrence of an expression E is called a common sub expression if E is ___. [ ]
a)Previously computed and the values of E have not changed
b) Previously computed and the values of E will change
c) After computed and the values of E have not changed
d) After computed and the values of E will change
5. The code generator, produces the target program from the transformed ______. [ ]
a)High level code b)Low level code c) Intermediate code d)All the above
6. The line variable analysis is done by __________. [ ]
a)ud-chains b)du-chains c)computation of in and out d)All the above
7. Which is not an example for function-preserving transformation? [ ]
a)Copy propagation b)Flow of control c)Constant folding d)dead-code elimination
8. A sound type system eliminates _____,when the target program runs. [ ]
a)Type errors b)runtime errors c)compile type errors d)none
9. Implicit type conversions, is __________. [ ]
a)Done automatically by the compiler. b) Done automatically by the interpreter
c) Done automatically by the OS d) Done automatically by the language
10.____________ determines the type of a language construct from the way it is used. [ ]
a)Type synthesis b)Type inference c)Type reference d)None
Cont…..[2]
[2]
Code No: 07A5EC20 Set No. 2
II. Fill in the Blanks:
11. The activations of procedures during the running of an entire program by a tree called _________.
12. The substitution of values for names whose values are constant is known as ______.
13. Activation records are sometimes called ______________.
14. If a transformation of a program performed by locking only at the statements in a basic blocks, called ________________.
15. The code improvement phase consists of _____________ followed by the application of transformation.
16. The replacement of an expressive operation by a cheaper one is called ________.
17. The relative address for a field name is relative to the __________ for that record.
18. Implicit type conversions also called ____________
19. The runtime representation of an object program in the logical address space consists of ___________.
20. The static data objects are created at ___________________.
-oOo-
Code No: 07A5EC20 Set No. 3
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
III B.Tech. I Sem., II Mid-Term Examinations, November– 2009
AUTOMATA AND COMPILER DESIGN
Objective Exam
Name: ______________________________ Hall Ticket No.
A
Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 20.
I. Choose the correct alternative:
1. Machine dependent optimization influenced by the _________ [ ]
a)Source machine b)Target machine c)Compiler d)Interpreter
2. An occurrence of an expression E is called a common sub expression if E is ___. [ ]
a)Previously computed and the values of E have not changed
b) Previously computed and the values of E will change
c) After computed and the values of E have not changed
d) After computed and the values of E will change
3. The code generator, produces the target program from the transformed ______. [ ]
a)High level code b)Low level code c) Intermediate code d)All the above
4. The line variable analysis is done by __________. [ ]
a)ud-chains b)du-chains c)computation of in and out d)All the above
5. Which is not an example for function-preserving transformation? [ ]
a)Copy propagation b)Flow of control c)Constant folding d)dead-code elimination
6. A sound type system eliminates _____,when the target program runs. [ ]
a)Type errors b)runtime errors c)compile type errors d)none
7. Implicit type conversions, is __________. [ ]
a)Done automatically by the compiler. b) Done automatically by the interpreter
c) Done automatically by the OS d) Done automatically by the language
8.____________ determines the type of a language construct from the way it is used. [ ]
a)Type synthesis b)Type inference c)Type reference d)None
9. A record is a data structure with ____________ [ ]
a)named fields b)fields c)named records d)records
10. Code Motion moves _____________. [ ]
a)Code outside a loop b)Code inside a loop c)Code top of a loop d)Code bottom of a loop.
Cont…..[2]
[2]
Code No: 07A5EC20 Set No. 3
II. Fill in the Blanks:
11. Activation records are sometimes called ______________.
12. If a transformation of a program performed by locking only at the statements in a basic blocks, called ________________.
13. The code improvement phase consists of _____________ followed by the application of transformation.
14. The replacement of an expressive operation by a cheaper one is called ________.
15. The relative address for a field name is relative to the __________ for that record.
16. Implicit type conversions also called ____________
17. The runtime representation of an object program in the logical address space consists of ___________.
18. The static data objects are created at ___________________.
19. The activations of procedures during the running of an entire program by a tree called _________.
20. The substitution of values for names whose values are constant is known as ______.
-oOo-
Code No: 07A5EC20 Set No. 4
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
III B.Tech. I Sem., II Mid-Term Examinations, November– 2009
AUTOMATA AND COMPILER DESIGN
Objective Exam
Name: ______________________________ Hall Ticket No.
A
Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 20.
I. Choose the correct alternative:
1. The code generator, produces the target program from the transformed ______. [ ]
a)High level code b)Low level code c) Intermediate code d)All the above
2. The line variable analysis is done by __________. [ ]
a)ud-chains b)du-chains c)computation of in and out d)All the above
3. Which is not an example for function-preserving transformation? [ ]
a)Copy propagation b)Flow of control c)Constant folding d)dead-code elimination
4. A sound type system eliminates _____,when the target program runs. [ ]
a)Type errors b)runtime errors c)compile type errors d)none
5. Implicit type conversions, is __________. [ ]
a)Done automatically by the compiler. b) Done automatically by the interpreter
c) Done automatically by the OS d) Done automatically by the language
6.____________ determines the type of a language construct from the way it is used. [ ]
a)Type synthesis b)Type inference c)Type reference d)None
7. A record is a data structure with ____________ [ ]
a)named fields b)fields c)named records d)records
8. Code Motion moves _____________. [ ]
a)Code outside a loop b)Code inside a loop c)Code top of a loop d)Code bottom of a loop.
9. Machine dependent optimization influenced by the _________ [ ]
a)Source machine b)Target machine c)Compiler d)Interpreter
10. An occurrence of an expression E is called a common sub expression if E is ___. [ ]
a)Previously computed and the values of E have not changed
b) Previously computed and the values of E will change
c) After computed and the values of E have not changed
d) After computed and the values of E will change
Cont…..[2]
[2]
Code No: 07A5EC20 Set No. 4
II. Fill in the Blanks:
11. The code improvement phase consists of _____________ followed by the application of transformation.
12. The replacement of an expressive operation by a cheaper one is called ________.
13. The relative address for a field name is relative to the __________ for that record.
14. Implicit type conversions also called ____________
15. The runtime representation of an object program in the logical address space consists of ___________.
16. The static data objects are created at ___________________.
17. The activations of procedures during the running of an entire program by a tree called _________.
18. The substitution of values for names whose values are constant is known as ______.
19. Activation records are sometimes called ______________.
20. If a transformation of a program performed by locking only at the statements in a basic blocks, called ________________.
-oOo-
formal languages and automata theory online bits
Code No: 07A50501 Set No. 1
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
III B.Tech. I Sem., II Mid-Term Examinations, November– 2009
FORMAL LANGUAGES AND AUTOMATA THEORY
Objective Exam
Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 20.
I. Choose the correct alternative:
1. ____is used for describing block structure in programming languages. [ ]
a)Context free Language b)Context sensitive c)procedural d)primitive references.
2. The derivation of CFG can be represented by______ [ ] a)graphs b)definitions. c)trees d)grammar
3. The yield of a derivation tree is the _______the labels of the leaves without related petition of the left –to-right ordering.. [ ]
a)union b)cancatination c)sequence d)join
4. The following CFG is equivalent of the RE S->aS/bS/a/b_____ [ ]
a)(a+b) b)(a+b)* c)(a+b)(a+b) d)all of these
5. If G is a Context free Grammar, we can find a context Free Grammar G1,which has no null
Productions or unit productios such that ____ [ ]
a)G1=G b)L(G1)=L(G) c)G(L)=G1(L) d)L=G.
6. In turing Machine directed edges are used to represent ______ [ ]
a)final state b)initial state c)trasition function d)transition of states.
7. _______is used to restrict the Length of the Tape in Turing machines. [ ]
a)finite Automation b)Deterministic Automaton
c)Non Linear Automaton d)Linear Bounded Automaton
8. In NP Completeness for defining P we require the______ [ ]
a)space complexity b)input strings c)time complexity d)Grammar
9. ____________ can be thought of as a Finite state automaton connected to R/W head [ ]
a)pumping Lemma b)turing machine
c)Finite Deterministic automaton d)Recursive Functions
10. In the Turing Machine each cell can store ____No of inputs as symbols. [ ]
a)finite b)Null c)one d)infinite
Cont…..[2]
A
[2]
Code No: 07A50501 Set No. 1
II. Fill in the Blanks:
11. _______ is a process of splitting a sentence into words.
12. ______________ is used to restrict the Length of the Tape.
13. Turing and church independently designed a computing machine which can carry out a ________
14. The class of Automata that can be associated with context free language _________
15. Type 0 language accepted by ________
16. A terminal symbol ω belongs c(G) is ____________ if there exists more than one, derivation trees
for ω
17. A language L is in the class ______ if there exists a Non-deterministic TMM, such that M has time complexity p(n) for some polynomial P and M accepts L.
18. Context sensitive Language accepted by ______________
19. A string of symbols obtained by reading the leaves of the tree from left to right,omitting any €’s
encountered is called ______
20. A variable may be _______ if there is no way of getting the terminal from it.
-oOo-
Code No: 07A50501 Set No. 2
FORMAL LANGUAGES AND AUTOMATA THEORY
Objective Exam
Name:______________________________ Hall Ticket No.
Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 20.
I. Choose the correct alternative:
1. The following CFG is equivalent of the RE S->aS/bS/a/b_____ [ ]
a)(a+b) b)(a+b)* c)(a+b)(a+b) d)all of these
2. If G is a Context free Grammar, we can find a context Free Grammar G1,which has no null
Productions or unit productios such that____ [ ]
a)G1=G b)L(G1)=L(G) c)G(L)=G1(L) d)L=G.
3. In turing Machine directed edges are used to represent ______ [ ]
a)final state b)initial state c)trasition function d)transition of states.
4. _______is used to restrict the Length of the Tape in Turing machines. [ ]
a)finite Automation b)Deterministic Automaton
c)Non Linear Automaton d)Linear Bounded Automaton
5. In NP Completeness for defining P we require the______ [ ]
a)space complexity b)input strings c)time complexity d)Grammar
6. ____________ can be thought of as a Finite state automaton connected to R/W head [ ]
a)pumping Lemma b)turing machine
c)Finite Deterministic automaton d)Recursive Functions
7. In the Turing Machine each cell can store ____No of inputs as symbols. [ ]
a)finite b)Null c)one d)infinite
8. ____is used for describing block structure in programming languages. [ ]
a)Context free Language b)Context sensitive c)procedural d)primitive references.
9. The derivation of CFG can be represented by______ [ ] a)graphs b)definitions. c)trees d)grammar
10. The yield of a derivation tree is the _______the labels of the leaves without related petition of the left –to-right ordering [ ]
a)union b)cancatination c)sequence d)join
Cont…..[2]
A
[2]
Code No: 07A50501 Set No. 2
II. Fill in the Blanks:
11. The class of Automata that can be associated with context free language _________
12. Type 0 language accepted by ________
13. A terminal symbol ω belongs c(G) is ____________ if there exists more than one, derivation trees
for ω
14. A language L is in the class ______ if there exists a Non-deterministic TMM, such that M has time complexity p(n) for some polynomial P and M accepts L.
15. Context sensitive Language accepted by ______________
16. A string of symbols obtained by reading the leaves of the tree from left to right,omitting any €’s
encountered is called ______
17. A variable may be _______ if there is no way of getting the terminal from it.
18. _______ is a process of splitting a sentence into words.
19. ______________ is used to restrict the Length of the Tape.
20. Turing and church independently designed a computing machine which can carry out a ________
-oOo-
Code No: 07A50501 Set No. 3
FORMAL LANGUAGES AND AUTOMATA THEORY
Objective Exam
Name:______________________________ Hall Ticket No.
Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 20.
I. Choose the correct alternative:
1. In turing Machine directed edges are used to represent ______ [ ]
a)final state b)initial state c)trasition function d)transition of states.
2. _______is used to restrict the Length of the Tape in Turing machines. [ ]
a)finite Automation b)Deterministic Automaton
c)Non Linear Automaton d)Linear Bounded Automaton
3. In NP Completeness for defining P we require the______ [ ]
a)space complexity b)input strings c)time complexity d)Grammar
4. ____________ can be thought of as a Finite state automaton connected to R/W head [ ]
a)pumping Lemma b)turing machine
c)Finite Deterministic automaton d)Recursive Functions
5. In the Turing Machine each cell can store ____No of inputs as symbols. [ ]
a)finite b)Null c)one d)infinite
6. ____is used for describing block structure in programming languages. [ ]
a)Context free Language b)Context sensitive c)procedural d)primitive references.
7. The derivation of CFG can be represented by______ [ ] a)graphs b)definitions. c)trees d)grammar
8. The yield of a derivation tree is the _______the labels of the leaves without related petition of the left –to-right ordering [ ]
a)union b)cancatination c)sequence d)join
9. The following CFG is equivalent of the RE S->aS/bS/a/b_____ [ ]
a) (a+b) b) (a+b)* c) (a+b)(a+b) d) all of these
10. If G is a Context free Grammar, we can find a context Free Grammar G1,which has no null
Productions or unit productios such that ____ [ ]
a) G1=G b) L(G1)=L(G) c) G(L)=G1(L) d) L=G.
Cont…..[2]
A
[2]
Code No: 07A50501 Set No. 3
II. Fill in the Blanks:
11. A terminal symbol ω belongs c(G) is ____________ if there exists more than one, derivation trees
for ω
12. A language L is in the class ______ if there exists a Non-deterministic TMM, such that M has time complexity p(n) for some polynomial P and M accepts L.
13. Context sensitive Language accepted by ______________
14. A string of symbols obtained by reading the leaves of the tree from left to right,omitting any €’s
encountered is called ______
15. A variable may be _______ if there is no way of getting the terminal from it.
16. _______ is a process of splitting a sentence into words.
17. ______________ is used to restrict the Length of the Tape.
18. Turing and church independently designed a computing machine which can carry out a ________
19. The class of Automata that can be associated with context free language _________
20. Type 0 language accepted by ________
-oOo-
Code No: 07A50501 Set No. 4
FORMAL LANGUAGES AND AUTOMATA THEORY
Objective Exam
Name:______________________________ Hall Ticket No.
Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 20.
I. Choose the correct alternative:
1. In NP Completeness for defining P we require the______ [ ]
a)space complexity b)input strings c)time complexity d)Grammar
2. ____________ can be thought of as a Finite state automaton connected to R/W head [ ]
a)pumping Lemma b)turing machine
c)Finite Deterministic automaton d)Recursive Functions
3. In the Turing Machine each cell can store ____No of inputs as symbols. [ ]
a)finite b)Null c)one d)infinite
4. ___is used for describing block structure in programming languages. [ ]
a)Context free Language b)Context sensitive c)procedural d)primitive references.
5. The derivation of CFG can be represented by______ [ ] a)graphs b)definitions. c)trees d)grammar
6. The yield of a derivation tree is the _______the labels of the leaves without related petition of the left –to-right ordering [ ]
a)union b)cancatination c)sequence d)join
7. The following CFG is equivalent of the RE S->aS/bS/a/b_____ [ ]
a)(a+b) b)(a+b)* c)(a+b)(a+b) d)all of these
8. If G is a Context free Grammar, we can find a context Free Grammar G1,which has no null
Productions or unit productios such that____ [ ]
a)G1=G b)L(G1)=L(G) c)G(L)=G1(L) d)L=G.
9. In turing Machine directed edges are used to represent ______ [ ]
a)final state b)initial state c)trasition function d)transition of states.
10. _______is used to restrict the Length of the Tape in Turing machines. [ ]
a)finite Automation b)Deterministic Automaton
c)Non Linear Automaton d)Linear Bounded Automaton
Cont…..[2]
A
[2]
Code No: 07A50501 Set No. 4
II. Fill in the Blanks:
11. Context sensitive Language accepted by ______________
12. A string of symbols obtained by reading the leaves of the tree from left to right,omitting any €’s
encountered is called ______
13. A variable may be _______ if there is no way of getting the terminal from it.
14. _______ is a process of splitting a sentence into words.
15. ______________ is used to restrict the Length of the Tape.
16. Turing and church independently designed a computing machine which can carry out a _________
17. The class of Automata that can be associated with context free language _________
18. Type 0 language accepted by ________
19. A terminal symbol ω belongs c(G) is ____________ if there exists more than one, derivation trees
for ω.
20. A language L is in the class ______ if there exists a Non-deterministic TMM, such that M has time complexity p(n) for some polynomial P and M accepts L.
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
III B.Tech. I Sem., II Mid-Term Examinations, November– 2009
FORMAL LANGUAGES AND AUTOMATA THEORY
Objective Exam
Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 20.
I. Choose the correct alternative:
1. ____is used for describing block structure in programming languages. [ ]
a)Context free Language b)Context sensitive c)procedural d)primitive references.
2. The derivation of CFG can be represented by______ [ ] a)graphs b)definitions. c)trees d)grammar
3. The yield of a derivation tree is the _______the labels of the leaves without related petition of the left –to-right ordering.. [ ]
a)union b)cancatination c)sequence d)join
4. The following CFG is equivalent of the RE S->aS/bS/a/b_____ [ ]
a)(a+b) b)(a+b)* c)(a+b)(a+b) d)all of these
5. If G is a Context free Grammar, we can find a context Free Grammar G1,which has no null
Productions or unit productios such that ____ [ ]
a)G1=G b)L(G1)=L(G) c)G(L)=G1(L) d)L=G.
6. In turing Machine directed edges are used to represent ______ [ ]
a)final state b)initial state c)trasition function d)transition of states.
7. _______is used to restrict the Length of the Tape in Turing machines. [ ]
a)finite Automation b)Deterministic Automaton
c)Non Linear Automaton d)Linear Bounded Automaton
8. In NP Completeness for defining P we require the______ [ ]
a)space complexity b)input strings c)time complexity d)Grammar
9. ____________ can be thought of as a Finite state automaton connected to R/W head [ ]
a)pumping Lemma b)turing machine
c)Finite Deterministic automaton d)Recursive Functions
10. In the Turing Machine each cell can store ____No of inputs as symbols. [ ]
a)finite b)Null c)one d)infinite
Cont…..[2]
A
[2]
Code No: 07A50501 Set No. 1
II. Fill in the Blanks:
11. _______ is a process of splitting a sentence into words.
12. ______________ is used to restrict the Length of the Tape.
13. Turing and church independently designed a computing machine which can carry out a ________
14. The class of Automata that can be associated with context free language _________
15. Type 0 language accepted by ________
16. A terminal symbol ω belongs c(G) is ____________ if there exists more than one, derivation trees
for ω
17. A language L is in the class ______ if there exists a Non-deterministic TMM, such that M has time complexity p(n) for some polynomial P and M accepts L.
18. Context sensitive Language accepted by ______________
19. A string of symbols obtained by reading the leaves of the tree from left to right,omitting any €’s
encountered is called ______
20. A variable may be _______ if there is no way of getting the terminal from it.
-oOo-
Code No: 07A50501 Set No. 2
FORMAL LANGUAGES AND AUTOMATA THEORY
Objective Exam
Name:______________________________ Hall Ticket No.
Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 20.
I. Choose the correct alternative:
1. The following CFG is equivalent of the RE S->aS/bS/a/b_____ [ ]
a)(a+b) b)(a+b)* c)(a+b)(a+b) d)all of these
2. If G is a Context free Grammar, we can find a context Free Grammar G1,which has no null
Productions or unit productios such that____ [ ]
a)G1=G b)L(G1)=L(G) c)G(L)=G1(L) d)L=G.
3. In turing Machine directed edges are used to represent ______ [ ]
a)final state b)initial state c)trasition function d)transition of states.
4. _______is used to restrict the Length of the Tape in Turing machines. [ ]
a)finite Automation b)Deterministic Automaton
c)Non Linear Automaton d)Linear Bounded Automaton
5. In NP Completeness for defining P we require the______ [ ]
a)space complexity b)input strings c)time complexity d)Grammar
6. ____________ can be thought of as a Finite state automaton connected to R/W head [ ]
a)pumping Lemma b)turing machine
c)Finite Deterministic automaton d)Recursive Functions
7. In the Turing Machine each cell can store ____No of inputs as symbols. [ ]
a)finite b)Null c)one d)infinite
8. ____is used for describing block structure in programming languages. [ ]
a)Context free Language b)Context sensitive c)procedural d)primitive references.
9. The derivation of CFG can be represented by______ [ ] a)graphs b)definitions. c)trees d)grammar
10. The yield of a derivation tree is the _______the labels of the leaves without related petition of the left –to-right ordering [ ]
a)union b)cancatination c)sequence d)join
Cont…..[2]
A
[2]
Code No: 07A50501 Set No. 2
II. Fill in the Blanks:
11. The class of Automata that can be associated with context free language _________
12. Type 0 language accepted by ________
13. A terminal symbol ω belongs c(G) is ____________ if there exists more than one, derivation trees
for ω
14. A language L is in the class ______ if there exists a Non-deterministic TMM, such that M has time complexity p(n) for some polynomial P and M accepts L.
15. Context sensitive Language accepted by ______________
16. A string of symbols obtained by reading the leaves of the tree from left to right,omitting any €’s
encountered is called ______
17. A variable may be _______ if there is no way of getting the terminal from it.
18. _______ is a process of splitting a sentence into words.
19. ______________ is used to restrict the Length of the Tape.
20. Turing and church independently designed a computing machine which can carry out a ________
-oOo-
Code No: 07A50501 Set No. 3
FORMAL LANGUAGES AND AUTOMATA THEORY
Objective Exam
Name:______________________________ Hall Ticket No.
Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 20.
I. Choose the correct alternative:
1. In turing Machine directed edges are used to represent ______ [ ]
a)final state b)initial state c)trasition function d)transition of states.
2. _______is used to restrict the Length of the Tape in Turing machines. [ ]
a)finite Automation b)Deterministic Automaton
c)Non Linear Automaton d)Linear Bounded Automaton
3. In NP Completeness for defining P we require the______ [ ]
a)space complexity b)input strings c)time complexity d)Grammar
4. ____________ can be thought of as a Finite state automaton connected to R/W head [ ]
a)pumping Lemma b)turing machine
c)Finite Deterministic automaton d)Recursive Functions
5. In the Turing Machine each cell can store ____No of inputs as symbols. [ ]
a)finite b)Null c)one d)infinite
6. ____is used for describing block structure in programming languages. [ ]
a)Context free Language b)Context sensitive c)procedural d)primitive references.
7. The derivation of CFG can be represented by______ [ ] a)graphs b)definitions. c)trees d)grammar
8. The yield of a derivation tree is the _______the labels of the leaves without related petition of the left –to-right ordering [ ]
a)union b)cancatination c)sequence d)join
9. The following CFG is equivalent of the RE S->aS/bS/a/b_____ [ ]
a) (a+b) b) (a+b)* c) (a+b)(a+b) d) all of these
10. If G is a Context free Grammar, we can find a context Free Grammar G1,which has no null
Productions or unit productios such that ____ [ ]
a) G1=G b) L(G1)=L(G) c) G(L)=G1(L) d) L=G.
Cont…..[2]
A
[2]
Code No: 07A50501 Set No. 3
II. Fill in the Blanks:
11. A terminal symbol ω belongs c(G) is ____________ if there exists more than one, derivation trees
for ω
12. A language L is in the class ______ if there exists a Non-deterministic TMM, such that M has time complexity p(n) for some polynomial P and M accepts L.
13. Context sensitive Language accepted by ______________
14. A string of symbols obtained by reading the leaves of the tree from left to right,omitting any €’s
encountered is called ______
15. A variable may be _______ if there is no way of getting the terminal from it.
16. _______ is a process of splitting a sentence into words.
17. ______________ is used to restrict the Length of the Tape.
18. Turing and church independently designed a computing machine which can carry out a ________
19. The class of Automata that can be associated with context free language _________
20. Type 0 language accepted by ________
-oOo-
Code No: 07A50501 Set No. 4
FORMAL LANGUAGES AND AUTOMATA THEORY
Objective Exam
Name:______________________________ Hall Ticket No.
Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 20.
I. Choose the correct alternative:
1. In NP Completeness for defining P we require the______ [ ]
a)space complexity b)input strings c)time complexity d)Grammar
2. ____________ can be thought of as a Finite state automaton connected to R/W head [ ]
a)pumping Lemma b)turing machine
c)Finite Deterministic automaton d)Recursive Functions
3. In the Turing Machine each cell can store ____No of inputs as symbols. [ ]
a)finite b)Null c)one d)infinite
4. ___is used for describing block structure in programming languages. [ ]
a)Context free Language b)Context sensitive c)procedural d)primitive references.
5. The derivation of CFG can be represented by______ [ ] a)graphs b)definitions. c)trees d)grammar
6. The yield of a derivation tree is the _______the labels of the leaves without related petition of the left –to-right ordering [ ]
a)union b)cancatination c)sequence d)join
7. The following CFG is equivalent of the RE S->aS/bS/a/b_____ [ ]
a)(a+b) b)(a+b)* c)(a+b)(a+b) d)all of these
8. If G is a Context free Grammar, we can find a context Free Grammar G1,which has no null
Productions or unit productios such that____ [ ]
a)G1=G b)L(G1)=L(G) c)G(L)=G1(L) d)L=G.
9. In turing Machine directed edges are used to represent ______ [ ]
a)final state b)initial state c)trasition function d)transition of states.
10. _______is used to restrict the Length of the Tape in Turing machines. [ ]
a)finite Automation b)Deterministic Automaton
c)Non Linear Automaton d)Linear Bounded Automaton
Cont…..[2]
A
[2]
Code No: 07A50501 Set No. 4
II. Fill in the Blanks:
11. Context sensitive Language accepted by ______________
12. A string of symbols obtained by reading the leaves of the tree from left to right,omitting any €’s
encountered is called ______
13. A variable may be _______ if there is no way of getting the terminal from it.
14. _______ is a process of splitting a sentence into words.
15. ______________ is used to restrict the Length of the Tape.
16. Turing and church independently designed a computing machine which can carry out a _________
17. The class of Automata that can be associated with context free language _________
18. Type 0 language accepted by ________
19. A terminal symbol ω belongs c(G) is ____________ if there exists more than one, derivation trees
for ω.
20. A language L is in the class ______ if there exists a Non-deterministic TMM, such that M has time complexity p(n) for some polynomial P and M accepts L.
Tuesday, September 16, 2008
Unix online bits quiz 1 unit 1 to 4
Unix online bits quiz 1 unit 1 to 4
1. In unix $ indicates
ans: total no of parameters
2. What is the o/p of
for x in ‘ls
do
chmod u = rwx $x
done
ans: change permissions of files in PWD as rwx for users
3. ------ command writes to force a message on all users terminals
ans: WALL
4. The commands to merge lines of files
ans: Paste
5. “$ cmd1 | cmd2”
Ans: makes standard output of cmd1 the standard input of cmd2.
6. ----------- command is used to create links.
Ans: ln
7. File descriptor for standard output
Ans: 1
8. The command used to remove successive empty lines from the given file is
Ans : uniq
9. command to see the processes running on a particular terminal
Ans: ps –t term
10. In vi editor the command to search forward in the buffer for the next occurrence of the pattern of text. Ans : /pattern
11. The command to add two floating point shell variables a and b
Ans: ’expr $a +$b | bc ‘
12. The command to know the value of your current shell
ans :$echo $$
13. -------- represent the default clause of the case control instruction
ans: %
14. The variables declared can be exported to
ans: new shell
15. $PS1=”JNTU” after execution of it , every time the system prompts it displays
ans: JNTU
16.The------- utility compares contents of the two files
ans: diff
17. hidden files in unix always begin with a character-----
ans: dot
18. The text manipulating utility is
ans: awk
19. cat file1> file2
ans:overwrite file2 with file1
20.--------------- is a filename substitution metacharacter . Ans: [...]
21. The command to merge lines of files.
Ans : paste
22. cat file1>> file2
Ans: CONTENTS OF FILE1 ARE APPENDED TO FILE2
23. The metacharacter which gives the shell a choice of any one character except those enclosed in the list.
Ans: [!...]
24. The command to subtract two floating point shell variables a and b.
ans : ‘expr $a-$b’ | bc
25. The command to give all permissions to user,group,others.
Ans: chmod 777 file
26. In --------- you can move commands from foreground execution to background execution as required.
Ans: C shell
27. The out put of the script
cout=1
while[$cout –le 10]
do
echo $count
done
Ans: infinite loop
28. the parent of the login shell------
ans: init
29. the command to list all files whose name start with a vowel is ..
ans: $ls [aeiou]*
30.--------command is not allowed within a variable name.
ans: more
31. ------symbol is not allowed within a vriable name.
ans: comma
32. -------describe the state of the file system how large it is, how many maximum files can it accommodate,
how many files can be created.
Ans: super block
33. User id of user is stored in ----- file
ans: /etc/password
34. the command to find the modulus of two variables a & b
ans: expr $a%$b
35. “$uniq –D xyz”
ans: only prints all duplicate lines
36. The default value of unix -defined variable PS2 is
ans: >>
37. First time after editing shell script, user has to give------ permissions to the file
ans: execute permissions to user
38. ----- represent default clause of the case control instruction
ans: *>
39. The file containing startup instruction for your account
ans: .profile
40. ---- operator is used to make file the standard out put , appending to it if it already exists
ans: >>
41. the command to load file XYZ place the cursor on the 100th line in the file
ans:$vi + 100XYZ
42. the----utility compares contents of the two directories
ans: diff
43. the variable declared can be exported to
ans: New shell
44.the command to unmount the systems
ans: umount
45. the command to print number of lines in a file.
Ans: nl
46. The command to display the value of the variable a is
ans: echo a
47. The command to know the value of your current shell
ans :$echo $$
48. First time after editing shell script, user has to give------ permissions to the file
ans: execute permissions to user
49. The tool to join commands together is –
ans: pipe
50.-----------command writes force a message to on all users terminals
ans: wall
51. “$ cmd1 | cmd2”
Ans: makes standard output of cmd1 the standard input of cmd2
52.---- the command is used join a group of files and prepares a archeve file
ans: tar
53. what is the out put of
for x in .
do
ls $x
done
ans: list all file names in present working directory
54. shell metacharacters are also called as
ans: regular expression
55. the desicion making statement offered by born shell
ans: if – then-else-if
56. “$cut -c3-5 xyz
ans : displays third to fifth character of each line from XYZ
57. ‘$ touch sample’, after execution of the command ,the size of the file named sample is-----
ans: zero bytes
58.unix command to rename a file is ----
ans: mv
59.”$catas”-----
ans:take input from the file aa and writes its out put file aa
60.the command to find the division of two floating point shell variables a and b
ans: expr $a/$b | bc
61. the best command to create several empty files quickly is ------
ans: touch
62.$ who | sort
ans: the out put of who on the screen is piped to sort
63.”$ uniq –d” file
ans: only prints all duplicate lines
64.the decision making statement offered by bourne shell
ans: if- then –fi
65.the vi editor, scroll, one page is
ans: at command used control f
66.---- operator is used to make a file the standard out put ,appending if it
already exists.
Ans: >>
1. In unix $ indicates
ans: total no of parameters
2. What is the o/p of
for x in ‘ls
do
chmod u = rwx $x
done
ans: change permissions of files in PWD as rwx for users
3. ------ command writes to force a message on all users terminals
ans: WALL
4. The commands to merge lines of files
ans: Paste
5. “$ cmd1 | cmd2”
Ans: makes standard output of cmd1 the standard input of cmd2.
6. ----------- command is used to create links.
Ans: ln
7. File descriptor for standard output
Ans: 1
8. The command used to remove successive empty lines from the given file is
Ans : uniq
9. command to see the processes running on a particular terminal
Ans: ps –t term
10. In vi editor the command to search forward in the buffer for the next occurrence of the pattern of text. Ans : /pattern
11. The command to add two floating point shell variables a and b
Ans: ’expr $a +$b | bc ‘
12. The command to know the value of your current shell
ans :$echo $$
13. -------- represent the default clause of the case control instruction
ans: %
14. The variables declared can be exported to
ans: new shell
15. $PS1=”JNTU” after execution of it , every time the system prompts it displays
ans: JNTU
16.The------- utility compares contents of the two files
ans: diff
17. hidden files in unix always begin with a character-----
ans: dot
18. The text manipulating utility is
ans: awk
19. cat file1> file2
ans:overwrite file2 with file1
20.--------------- is a filename substitution metacharacter . Ans: [...]
21. The command to merge lines of files.
Ans : paste
22. cat file1>> file2
Ans: CONTENTS OF FILE1 ARE APPENDED TO FILE2
23. The metacharacter which gives the shell a choice of any one character except those enclosed in the list.
Ans: [!...]
24. The command to subtract two floating point shell variables a and b.
ans : ‘expr $a-$b’ | bc
25. The command to give all permissions to user,group,others.
Ans: chmod 777 file
26. In --------- you can move commands from foreground execution to background execution as required.
Ans: C shell
27. The out put of the script
cout=1
while[$cout –le 10]
do
echo $count
done
Ans: infinite loop
28. the parent of the login shell------
ans: init
29. the command to list all files whose name start with a vowel is ..
ans: $ls [aeiou]*
30.--------command is not allowed within a variable name.
ans: more
31. ------symbol is not allowed within a vriable name.
ans: comma
32. -------describe the state of the file system how large it is, how many maximum files can it accommodate,
how many files can be created.
Ans: super block
33. User id of user is stored in ----- file
ans: /etc/password
34. the command to find the modulus of two variables a & b
ans: expr $a%$b
35. “$uniq –D xyz”
ans: only prints all duplicate lines
36. The default value of unix -defined variable PS2 is
ans: >>
37. First time after editing shell script, user has to give------ permissions to the file
ans: execute permissions to user
38. ----- represent default clause of the case control instruction
ans: *>
39. The file containing startup instruction for your account
ans: .profile
40. ---- operator is used to make file the standard out put , appending to it if it already exists
ans: >>
41. the command to load file XYZ place the cursor on the 100th line in the file
ans:$vi + 100XYZ
42. the----utility compares contents of the two directories
ans: diff
43. the variable declared can be exported to
ans: New shell
44.the command to unmount the systems
ans: umount
45. the command to print number of lines in a file.
Ans: nl
46. The command to display the value of the variable a is
ans: echo a
47. The command to know the value of your current shell
ans :$echo $$
48. First time after editing shell script, user has to give------ permissions to the file
ans: execute permissions to user
49. The tool to join commands together is –
ans: pipe
50.-----------command writes force a message to on all users terminals
ans: wall
51. “$ cmd1 | cmd2”
Ans: makes standard output of cmd1 the standard input of cmd2
52.---- the command is used join a group of files and prepares a archeve file
ans: tar
53. what is the out put of
for x in .
do
ls $x
done
ans: list all file names in present working directory
54. shell metacharacters are also called as
ans: regular expression
55. the desicion making statement offered by born shell
ans: if – then-else-if
56. “$cut -c3-5 xyz
ans : displays third to fifth character of each line from XYZ
57. ‘$ touch sample’, after execution of the command ,the size of the file named sample is-----
ans: zero bytes
58.unix command to rename a file is ----
ans: mv
59.”$cat
ans:take input from the file aa and writes its out put file aa
60.the command to find the division of two floating point shell variables a and b
ans: expr $a/$b | bc
61. the best command to create several empty files quickly is ------
ans: touch
62.$ who | sort
ans: the out put of who on the screen is piped to sort
63.”$ uniq –d” file
ans: only prints all duplicate lines
64.the decision making statement offered by bourne shell
ans: if- then –fi
65.the vi editor, scroll, one page is
ans: at command used control f
66.---- operator is used to make a file the standard out put ,appending if it
already exists.
Ans: >>
Thursday, December 6, 2007
quiz 1 unit 1 & 2 continuation
81. C language has been developed by
a) Peter Norton b) martin Richards c) Ken Thomson d) Dennis Ritchie
82. The constant ‘\b’ is used for
a) tab b) backspace c) bell d) vertical blank
83. In the following which one is not a “c” key word
a) case b) choice c) volatile d) for
84. The size of operator returns the size of an operand
a) in bits b) in words c) in bytes d)in float
85. The value of 2%5 is
a) 3 b) 10 c) 0 d) 2
86. && and || are which kind of program
a) arithmetic b) logical c) bitwise d) assignment operator
87. consider the following program
main( )
{ int a=2;
printf(“%d”,a);
modify(a);
printf(“%d”,a);
}
void modify(int a)
{
d=a*3;
printf(“%d”,a);
return; }
the out put of the above program is
a) 2 66 b) 626 c) 66 2 d) 262
88. Float c, c=25/2; what is the value of c
a) 12.500000 b) 12 c) 12.0 d) 12.00000
90. Give the output of the following program
#include
main( )
{ int a, count;
int funct(int count);
for(count=1; count<=5; ++count)
{ a=funct 1(count);
printf(“%d”,a);
}
int funct(int count)
{ int y;
y=x*x;
return(y);
}
a) 1 , 4, 9, 16, 25 b)25 c) 36 d) 25, 9, 16
91. main ( )
{ }
int a;
fun1( ){ }
fun2( ){ }
To which of the above functions, int a is available to
a) available to neither of the function b) all functions
c) only fun1( ) d) both fun1( ) and fun2( )
92. The function sqrt of ----heder file
a) math.c b) iostream.h c) stadio.h d) conio.h
93. what is the range of char data value?
a)-128 to 127 b)-64 to 64 c) 0 to 255 d) -127 to 128
100. main( )
{
int a =0;
if (a) printf(“%d”,a+=2);
} the out put is
a) 3 b) 1 c) 2 d) 0
101. Int data type occupies------ no.of bytes.
a. 2bytes b. 4bytes c. 16bytes d. 32 bytes
102. Short int occupies---------- bits.
a. 8bits b.16bits c. 32bits d. 64bits
103. Evaluate 2%3*5+6/2* -----
a. 0 b.13 c. 3 d. 8
104. Out put of inta=10;printf(“%f”,a); is-----
a. 10 b.10.0 c. 0 d. error
105. Out of int a; a=5>6; if (a) printf(“you”)else printf(“me”);-----
a. you b. me c. youme d. error
106. Out put of int x=5, y; y=(x>5?3:4);-----------
a. 5 b. 3 c. 4 d. 0
107. Out put of int x=10; char y;------------
y=(x= =10? ‘A’ : ‘B’ );printf(“%d”,y);
a. 10 b. A c. B d. 65
108. Value of k is, float i=10.0,k; k=i%2------------
a. 0 b. 0.0 c. 1 d. error
109. I=I+1 is equal to -------
a. I++ b. ++I c. I+=1 d. all of above
110. Out put of : printf(“ %d”, size of (‘8’));
a. 8 b. 1 c. 2 d. 4
111. Loop Statements.
a. for b. while c. do…while d. all of above
112. C is
a. operating system b. package c. compiler d. dbms
113. & is a unary operator
a. true b. false
114. Format code %s is used for
a. int b. character c. string d. float
115. Range of int data type.
a. -32768 to 32767 fixed b. -128 to 127
c. Depending on the compiler d. infinite
116. char data type occupies____no. of bytes
a. 8 bits b. 18 bits c. 1 bit d. 32 bits
117. Standard keywords in ‘C’ is
a. 16 b. 32 c. 64 d.128
118. Pick out the valid variable
a. simple. Interest; b. simple interest
c. simple-interest d. simple_interest
119. In the following which is not a valid variable
a. stu.name; b. _stu_name;
c. stu_name; d. stu_name1;
120. What would be the output of the following
int i=32769; printf(“%d”,i);
a. 32767 b. 0 c.-32767 d. Error
a) Peter Norton b) martin Richards c) Ken Thomson d) Dennis Ritchie
82. The constant ‘\b’ is used for
a) tab b) backspace c) bell d) vertical blank
83. In the following which one is not a “c” key word
a) case b) choice c) volatile d) for
84. The size of operator returns the size of an operand
a) in bits b) in words c) in bytes d)in float
85. The value of 2%5 is
a) 3 b) 10 c) 0 d) 2
86. && and || are which kind of program
a) arithmetic b) logical c) bitwise d) assignment operator
87. consider the following program
main( )
{ int a=2;
printf(“%d”,a);
modify(a);
printf(“%d”,a);
}
void modify(int a)
{
d=a*3;
printf(“%d”,a);
return; }
the out put of the above program is
a) 2 66 b) 626 c) 66 2 d) 262
88. Float c, c=25/2; what is the value of c
a) 12.500000 b) 12 c) 12.0 d) 12.00000
90. Give the output of the following program
#include
main( )
{ int a, count;
int funct(int count);
for(count=1; count<=5; ++count)
{ a=funct 1(count);
printf(“%d”,a);
}
int funct(int count)
{ int y;
y=x*x;
return(y);
}
a) 1 , 4, 9, 16, 25 b)25 c) 36 d) 25, 9, 16
91. main ( )
{ }
int a;
fun1( ){ }
fun2( ){ }
To which of the above functions, int a is available to
a) available to neither of the function b) all functions
c) only fun1( ) d) both fun1( ) and fun2( )
92. The function sqrt of ----heder file
a) math.c b) iostream.h c) stadio.h d) conio.h
93. what is the range of char data value?
a)-128 to 127 b)-64 to 64 c) 0 to 255 d) -127 to 128
100. main( )
{
int a =0;
if (a) printf(“%d”,a+=2);
} the out put is
a) 3 b) 1 c) 2 d) 0
101. Int data type occupies------ no.of bytes.
a. 2bytes b. 4bytes c. 16bytes d. 32 bytes
102. Short int occupies---------- bits.
a. 8bits b.16bits c. 32bits d. 64bits
103. Evaluate 2%3*5+6/2* -----
a. 0 b.13 c. 3 d. 8
104. Out put of inta=10;printf(“%f”,a); is-----
a. 10 b.10.0 c. 0 d. error
105. Out of int a; a=5>6; if (a) printf(“you”)else printf(“me”);-----
a. you b. me c. youme d. error
106. Out put of int x=5, y; y=(x>5?3:4);-----------
a. 5 b. 3 c. 4 d. 0
107. Out put of int x=10; char y;------------
y=(x= =10? ‘A’ : ‘B’ );printf(“%d”,y);
a. 10 b. A c. B d. 65
108. Value of k is, float i=10.0,k; k=i%2------------
a. 0 b. 0.0 c. 1 d. error
109. I=I+1 is equal to -------
a. I++ b. ++I c. I+=1 d. all of above
110. Out put of : printf(“ %d”, size of (‘8’));
a. 8 b. 1 c. 2 d. 4
111. Loop Statements.
a. for b. while c. do…while d. all of above
112. C is
a. operating system b. package c. compiler d. dbms
113. & is a unary operator
a. true b. false
114. Format code %s is used for
a. int b. character c. string d. float
115. Range of int data type.
a. -32768 to 32767 fixed b. -128 to 127
c. Depending on the compiler d. infinite
116. char data type occupies____no. of bytes
a. 8 bits b. 18 bits c. 1 bit d. 32 bits
117. Standard keywords in ‘C’ is
a. 16 b. 32 c. 64 d.128
118. Pick out the valid variable
a. simple. Interest; b. simple interest
c. simple-interest d. simple_interest
119. In the following which is not a valid variable
a. stu.name; b. _stu_name;
c. stu_name; d. stu_name1;
120. What would be the output of the following
int i=32769; printf(“%d”,i);
a. 32767 b. 0 c.-32767 d. Error
cpds quiz 1 Unit 1 and 2
1). which of the following operators is not used ---
a) >> b) > c) x d) &
2). which of the following in not a keyword ----
a) Constant b) signed c) typedef d) register
3). A machine language program consists of instructions written in
a) English like words b) keywords
b) mnemonics d) 0’s and 1’s
4). which function is used to convert a string of digits into their integer values
a) itoa b) atoi c) asctoint d) btoi
5). the names of actual parameters and formal parameters are
a) Almost same b) should be same c) always same d) need not be same
6). the symbol for right shift operator is
a) <- b) -> c) >> d) >
7). Which of the following is shorthand operator for a= a % b
a) a =% b b) a % b c) a %= b d) a %b =a
8). In the following is which on is not a c keyword?
a) case b) for c) volatile d) choice.
9). Pseudo code is
a) Language independent code b) code developed using the syntax of a special -
-language c) refined version of program d) out come of compilation process
10). The escape sequence ‘\t’ is a
a) next line . b) next column c) backspace d) tab
11). What is the value of !0?
a) 1 b) 00 c) 0 d) -1
12). If a=15 then b=a<<2 will results
a) b=3 b) b=30 c) b =7 d) b=6
13). in the expression b=6.6/9+ (2*a+ (3*c)/a*d)/ (2/n); which operation will be
performed first
a) 6.6/9 b) 2*a c) 2/n d) 3*c
14). what is the output of the program
main( )
{
int a=123;
int r, rev;
while (a>0)
{
a=a%10;
rev=rev*10+a;
a=a/10;
}
}
a) 123 b) 3 c) 321 d) 30201
15). which of the following shows the correct hierarchy of arithmetic operations
In ‘c’
a) ( ), / or *, - or +
b) ( ), &&,* or /, + or –
c) ( ), &&,*, /,+, -
d) ( ),&&, /,*,+,-
16). What is the result of the expression (10/3)*3+5%3?
a) 10 b) 11 c) 8 d) 1
17). The symbol for exclusive OR operator is
a) ~ b) / c) & d) ^
18). Which of the following is used in to indicate logical OR
a) U b) || c) V d) /
19). Addition of two numbers is performed using
a) logical operators b) conditional operator c) relational d)arithmetic
20). Int a=13, b=7, c;
c=a&b; what is the value of c
a) 0000 0000 0000 0110 b) 0000 0000 0000 0100
c) 0000 0000 0000 0101 d) 0000 0000 0000 0101
21). Among the following operators which operators has the highest priority
a) Bitwise XOR b) logical OR c) logical AND d) bitwise OR
22). The number of loop constructs in c is
a) 3 b) 4 c) 5 d) 2
23). An array can have ----- dimension(s)
a) three b) single c) multiple d) double
24). Which of the following is a string
a) ‘abcd b) “abcd” c) abcd d) ‘abcd”
25). Consider the array definition int num[10]={3,3,3}; pick the correct answers
a) this is syntactically wrong b) the value of num[8] is 3
c) this is invalid if it comes within a function d) the value num[2] is 3
26). Literal means
a) character b) A string c) A string constant d) An alphabet
27). The parameters in a function definition are
a) Actual parameter b) dummy parameter
c) real parameters d) formal parameter
28). Array elements are stored in
a) scattered memory location b) sequential memory locations
c) direct memory location d) random memory locations
29). Consider scanf(“%2d”, &n), and the input data
a) 31.42 b) 42 c) 31 d) error
30). which is syntactically correct;
a) if (a,eq 10){;} else if(a<10){;} b) if(a:-10){;} else if(a<10){;}
c)if(a—10){;} else if(a<10){;} d) if(a.eq.10){;} else if(a<10){;}
31). The output of the statement printf(%d”,0xdc)is----
a) 420 b) 320 c) 120 d) 220
32). A character array is terminated internally with
a) Space b) ‘\0’ c) 0 (d) ;
34). The operators *, ||, <, = if arranged in the ascending order of precedence reads
a). =, ||, <,* b) *, ||, =, < c) <, ||, =, * d) =, <, ||, *
35). The following program
main( )
{
static int a[]={7, 8, 9};
printf(“%d”, a[2]=2[a]+a[2]);
}
a) will compile successfully b) results in segmentation error
c) result in bug error d) runtime error
36). The process of removing a bug is known as
a) running b) execution c) debugging d) compilation
37). Identify the unconditional control structure
a) switch-case b) goto c) if d) do- wile
38). The function used to find the length of the string
a) strrev( ) b) strint( ) c) stracat( ) d) strlen( )
39). Which of the following is the symbol for preprocessor
a) < > b) # c) & d) *
40). How many variables of the same type can be initialized at a time with the same value
a) any no.of variables b) one c) two d) three
41). What will be the final value s of x and y?
# include
main( )
{
int x=1,y=1;
do while (y<=s);
printf(“\n x=%d =%d”, x,y);
a) x=6 , y=9 b) x=9,y=6 c) x=6,y=6 d) x=9 , y=9
42). For the array declaration int[s]; what is the amount of storage required?
a) 20 bytes b) 5 bytes c) 10 bytes d) 5 bytes
43). main( )
{
int a=5, float b=10 ,c;
c=b%a;
printf(“%f”, c)
} out put is ------------
a) 0.00000 b) gives an error c) o.oo d) 2.0
44). Which of the following statement is not true about the switch statement .
a) in switch( ) case statement nested if can be used
b) character constants are automatically converted in to integer
c) the switch( ) can evaluate relational or logical expression
d) no two case
45). “void” means -----
a) Something not known b) 0 c) 1 d) nothing
46). A string in the ‘c’ language is represented by enclosing a sequence of characters in
a) flower brackets b) double quotes c) parenthesis d) single quoets
47). The operator % yields
a) fractional part b) remainder after integer division
c) quotient value d) percentage value
48). Which of the following is correct way of defining a symbolic constant pie in c
a)# define pie 22/7 b) # difine pie -22/7 c) #difine 22/7 d) #difine pie -3.142
49).In the following c-statement what is the datatype of d and st respectively
printf (“%d\t% s\n”, d,st);
a)string, string b) character ,string c) digit, string d) digit,int
50). X=9-(12/3) +3*2)-1 what is the value of x
a) 2 b) 10 c) -2 d) 8
51). The declaration of a variable should be done
a) before using it b) after using it c) at the time using it d) only in the calling program
52). Identify the relational operator in c
a) || b) && c)! d) <
53). what is the out put
int j=5;
printf(“%d%d%d”,j,--j,j--);
a) 5 4 3 b) 3 4 4 c) 3 4 5 d) 3 3 5
54). What would be the output of the following
char c=8;
c>>=1&&!0;
printf(“%d”,c);
a) 0 b) 1 c) 4 d) 8
55). Pick out the valid one
a) a=10=b=c; b) a=b=10=c; c) a=b=c=10; d) 10=a=b=c;
56). what would be the out put of the following
int a=10;
printf(“%f”,a);
a) 10 b) 10.0 c) 0 d) error at execution time
57). What would be the output of the following
int I=-3,j=-2k=0,m;
M=++I&&++j||++k
Printf(“\n %d %d”, k,m);
a) 1 1 b) 0 1 c) 1 0 d) 0 0
58). What would be the output of the following
int i=5,j=0,k,l;
k=i&&j;
l=i||j;
a) 0 0 b) 0 1 c) 1 0 b) 1 1
59). What would be the output of the following
if(1)
printf(“CSE”);
else
printf(“Department”);
a). CSE b) department c) CSE Department d) error
60). What would be the out put of the following
int I,j;
for(I=1,j=2;i<=2;I++,j--)
printf(“%d %d”, I,j);
a) 1 1 2 2 c) 1 2 2 2 d) 1 2 2 1 e) 1 2 1 2
64).How many while statements are possible in do – while loop;
a) 2 b) 3 c) 1 d) any number
65).The statement that prints out the character set from A-Z is an integer variable
a) for (a=’a’; a<=’Z’, a++)print(%c”,a);
b) for (a=’A’; a<=’Z’,a++)printf(“%c”,a);
c) for (a=’A’ a<=’z’,a++)printf(“%c”,a);
d) for (a=’A’a<=’Z’,a++)printf(“%c”,a);
66). The error in a program is called
a) flow b) bug c) virus d) vaccine
67). The ANSI C standard recognize maximum length of a variable up to
a) 31 character b) unlimited char c) 8 char d) 15 char
68). The no.of a variables, functions, arrays, are krown as
a) keywords b) identifiers c) names d) elements
69). Switch (ch)
{
case ‘a’: printf(“a”);
case ‘b’:printf(“b”);
default: printf(“error”);
}
if char is assigned to the character ‘a’ then the output will be
a) ab b) ab error c) a d) error
70). When both called function and calling function are same then the process
is said to be
a) synchronization b) modularity
c) recursion d) concurrency
71). The effect of shifting a variable to the left by one bit position is
a) add it by 2 b) mul it by 2 c) div it by 2 d) sub it by 2
72) which of the following is not a keyword
a) enum b) storage c) signed d) register
73) what is the size of long double variable
a) 8bytes b) 10 bytes c) 16 bytes d) 4bytes
74) The function definition contains code for the function
a)true b)false
75) Variables defined within a block have global scope
a)true b)false
76) Top-down design means dividing a bigger program into smaller programs
a)true b)false
77) Which of the following is not part of a function header?
a)name b)parameters c)return type d)title
78) Pow(), abs(), sqrt() are standard functions available in math.h
a)true b)false
79) Each C program must have one and only one function called as main()
a)true b)false
80) Function is a data type
a)true b)false
a) >> b) > c) x d) &
2). which of the following in not a keyword ----
a) Constant b) signed c) typedef d) register
3). A machine language program consists of instructions written in
a) English like words b) keywords
b) mnemonics d) 0’s and 1’s
4). which function is used to convert a string of digits into their integer values
a) itoa b) atoi c) asctoint d) btoi
5). the names of actual parameters and formal parameters are
a) Almost same b) should be same c) always same d) need not be same
6). the symbol for right shift operator is
a) <- b) -> c) >> d) >
7). Which of the following is shorthand operator for a= a % b
a) a =% b b) a % b c) a %= b d) a %b =a
8). In the following is which on is not a c keyword?
a) case b) for c) volatile d) choice.
9). Pseudo code is
a) Language independent code b) code developed using the syntax of a special -
-language c) refined version of program d) out come of compilation process
10). The escape sequence ‘\t’ is a
a) next line . b) next column c) backspace d) tab
11). What is the value of !0?
a) 1 b) 00 c) 0 d) -1
12). If a=15 then b=a<<2 will results
a) b=3 b) b=30 c) b =7 d) b=6
13). in the expression b=6.6/9+ (2*a+ (3*c)/a*d)/ (2/n); which operation will be
performed first
a) 6.6/9 b) 2*a c) 2/n d) 3*c
14). what is the output of the program
main( )
{
int a=123;
int r, rev;
while (a>0)
{
a=a%10;
rev=rev*10+a;
a=a/10;
}
}
a) 123 b) 3 c) 321 d) 30201
15). which of the following shows the correct hierarchy of arithmetic operations
In ‘c’
a) ( ), / or *, - or +
b) ( ), &&,* or /, + or –
c) ( ), &&,*, /,+, -
d) ( ),&&, /,*,+,-
16). What is the result of the expression (10/3)*3+5%3?
a) 10 b) 11 c) 8 d) 1
17). The symbol for exclusive OR operator is
a) ~ b) / c) & d) ^
18). Which of the following is used in to indicate logical OR
a) U b) || c) V d) /
19). Addition of two numbers is performed using
a) logical operators b) conditional operator c) relational d)arithmetic
20). Int a=13, b=7, c;
c=a&b; what is the value of c
a) 0000 0000 0000 0110 b) 0000 0000 0000 0100
c) 0000 0000 0000 0101 d) 0000 0000 0000 0101
21). Among the following operators which operators has the highest priority
a) Bitwise XOR b) logical OR c) logical AND d) bitwise OR
22). The number of loop constructs in c is
a) 3 b) 4 c) 5 d) 2
23). An array can have ----- dimension(s)
a) three b) single c) multiple d) double
24). Which of the following is a string
a) ‘abcd b) “abcd” c) abcd d) ‘abcd”
25). Consider the array definition int num[10]={3,3,3}; pick the correct answers
a) this is syntactically wrong b) the value of num[8] is 3
c) this is invalid if it comes within a function d) the value num[2] is 3
26). Literal means
a) character b) A string c) A string constant d) An alphabet
27). The parameters in a function definition are
a) Actual parameter b) dummy parameter
c) real parameters d) formal parameter
28). Array elements are stored in
a) scattered memory location b) sequential memory locations
c) direct memory location d) random memory locations
29). Consider scanf(“%2d”, &n), and the input data
a) 31.42 b) 42 c) 31 d) error
30). which is syntactically correct;
a) if (a,eq 10){;} else if(a<10){;} b) if(a:-10){;} else if(a<10){;}
c)if(a—10){;} else if(a<10){;} d) if(a.eq.10){;} else if(a<10){;}
31). The output of the statement printf(%d”,0xdc)is----
a) 420 b) 320 c) 120 d) 220
32). A character array is terminated internally with
a) Space b) ‘\0’ c) 0 (d) ;
34). The operators *, ||, <, = if arranged in the ascending order of precedence reads
a). =, ||, <,* b) *, ||, =, < c) <, ||, =, * d) =, <, ||, *
35). The following program
main( )
{
static int a[]={7, 8, 9};
printf(“%d”, a[2]=2[a]+a[2]);
}
a) will compile successfully b) results in segmentation error
c) result in bug error d) runtime error
36). The process of removing a bug is known as
a) running b) execution c) debugging d) compilation
37). Identify the unconditional control structure
a) switch-case b) goto c) if d) do- wile
38). The function used to find the length of the string
a) strrev( ) b) strint( ) c) stracat( ) d) strlen( )
39). Which of the following is the symbol for preprocessor
a) < > b) # c) & d) *
40). How many variables of the same type can be initialized at a time with the same value
a) any no.of variables b) one c) two d) three
41). What will be the final value s of x and y?
# include
main( )
{
int x=1,y=1;
do while (y<=s);
printf(“\n x=%d =%d”, x,y);
a) x=6 , y=9 b) x=9,y=6 c) x=6,y=6 d) x=9 , y=9
42). For the array declaration int[s]; what is the amount of storage required?
a) 20 bytes b) 5 bytes c) 10 bytes d) 5 bytes
43). main( )
{
int a=5, float b=10 ,c;
c=b%a;
printf(“%f”, c)
} out put is ------------
a) 0.00000 b) gives an error c) o.oo d) 2.0
44). Which of the following statement is not true about the switch statement .
a) in switch( ) case statement nested if can be used
b) character constants are automatically converted in to integer
c) the switch( ) can evaluate relational or logical expression
d) no two case
45). “void” means -----
a) Something not known b) 0 c) 1 d) nothing
46). A string in the ‘c’ language is represented by enclosing a sequence of characters in
a) flower brackets b) double quotes c) parenthesis d) single quoets
47). The operator % yields
a) fractional part b) remainder after integer division
c) quotient value d) percentage value
48). Which of the following is correct way of defining a symbolic constant pie in c
a)# define pie 22/7 b) # difine pie -22/7 c) #difine 22/7 d) #difine pie -3.142
49).In the following c-statement what is the datatype of d and st respectively
printf (“%d\t% s\n”, d,st);
a)string, string b) character ,string c) digit, string d) digit,int
50). X=9-(12/3) +3*2)-1 what is the value of x
a) 2 b) 10 c) -2 d) 8
51). The declaration of a variable should be done
a) before using it b) after using it c) at the time using it d) only in the calling program
52). Identify the relational operator in c
a) || b) && c)! d) <
53). what is the out put
int j=5;
printf(“%d%d%d”,j,--j,j--);
a) 5 4 3 b) 3 4 4 c) 3 4 5 d) 3 3 5
54). What would be the output of the following
char c=8;
c>>=1&&!0;
printf(“%d”,c);
a) 0 b) 1 c) 4 d) 8
55). Pick out the valid one
a) a=10=b=c; b) a=b=10=c; c) a=b=c=10; d) 10=a=b=c;
56). what would be the out put of the following
int a=10;
printf(“%f”,a);
a) 10 b) 10.0 c) 0 d) error at execution time
57). What would be the output of the following
int I=-3,j=-2k=0,m;
M=++I&&++j||++k
Printf(“\n %d %d”, k,m);
a) 1 1 b) 0 1 c) 1 0 d) 0 0
58). What would be the output of the following
int i=5,j=0,k,l;
k=i&&j;
l=i||j;
a) 0 0 b) 0 1 c) 1 0 b) 1 1
59). What would be the output of the following
if(1)
printf(“CSE”);
else
printf(“Department”);
a). CSE b) department c) CSE Department d) error
60). What would be the out put of the following
int I,j;
for(I=1,j=2;i<=2;I++,j--)
printf(“%d %d”, I,j);
a) 1 1 2 2 c) 1 2 2 2 d) 1 2 2 1 e) 1 2 1 2
64).How many while statements are possible in do – while loop;
a) 2 b) 3 c) 1 d) any number
65).The statement that prints out the character set from A-Z is an integer variable
a) for (a=’a’; a<=’Z’, a++)print(%c”,a);
b) for (a=’A’; a<=’Z’,a++)printf(“%c”,a);
c) for (a=’A’ a<=’z’,a++)printf(“%c”,a);
d) for (a=’A’a<=’Z’,a++)printf(“%c”,a);
66). The error in a program is called
a) flow b) bug c) virus d) vaccine
67). The ANSI C standard recognize maximum length of a variable up to
a) 31 character b) unlimited char c) 8 char d) 15 char
68). The no.of a variables, functions, arrays, are krown as
a) keywords b) identifiers c) names d) elements
69). Switch (ch)
{
case ‘a’: printf(“a”);
case ‘b’:printf(“b”);
default: printf(“error”);
}
if char is assigned to the character ‘a’ then the output will be
a) ab b) ab error c) a d) error
70). When both called function and calling function are same then the process
is said to be
a) synchronization b) modularity
c) recursion d) concurrency
71). The effect of shifting a variable to the left by one bit position is
a) add it by 2 b) mul it by 2 c) div it by 2 d) sub it by 2
72) which of the following is not a keyword
a) enum b) storage c) signed d) register
73) what is the size of long double variable
a) 8bytes b) 10 bytes c) 16 bytes d) 4bytes
74) The function definition contains code for the function
a)true b)false
75) Variables defined within a block have global scope
a)true b)false
76) Top-down design means dividing a bigger program into smaller programs
a)true b)false
77) Which of the following is not part of a function header?
a)name b)parameters c)return type d)title
78) Pow(), abs(), sqrt() are standard functions available in math.h
a)true b)false
79) Each C program must have one and only one function called as main()
a)true b)false
80) Function is a data type
a)true b)false
Subscribe to:
Posts (Atom)