<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>Free Question Bank &#187; Exam</title> <atom:link href="http://www.freequestionbank.com/category/question/exam/feed/" rel="self" type="application/rss+xml" /><link>http://www.freequestionbank.com</link> <description>Just another WordPress weblog</description> <lastBuildDate>Sat, 20 Feb 2010 05:10:08 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.9.1</generator> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Basic sed tricks</title><link>http://www.freequestionbank.com/question/basic-sed-tricks/</link> <comments>http://www.freequestionbank.com/question/basic-sed-tricks/#comments</comments> <pubDate>Tue, 19 May 2009 03:31:43 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Exam]]></category> <category><![CDATA[Interview]]></category> <category><![CDATA[Question]]></category> <category><![CDATA[Tech]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[questions]]></category> <category><![CDATA[sed]]></category><guid
isPermaLink="false">http://www.freequestionbank.com/blog/?p=601</guid> <description><![CDATA[What is sed? &#8211; sed is stream editor, a Unix tool for working with streams of text data. See the ...]]></description> <content:encoded><![CDATA[<div
class="entry-content"><ol><li><strong>What is sed?</strong> &#8211; sed is <strong>s</strong>tream <strong>ed</strong>itor, a Unix tool for working with streams of text data. See <a
href="http://www.grymoire.com/Unix/Sed.html#toc-uh-0">the awful truth about sed</a>.</li><li><strong>How do you substitute strings with sed?</strong> &#8211; Use ’s/old/new’ command, so sed ’s/hello/goodbye/’ would substitute the occurrence of the word hello to goodbye.</li><li><strong>How do you inject text with sed?</strong> &#8211; &amp; in the substitution string defines the pattern found in the search string. As an example, here’s us trying to find a word ‘hello’ and replacing it with ‘hello and how are you’:<br
/> echo ‘hello there’ | sed ’s/^hello/&amp; and how are you/’</li><li><strong>Can I find several patterns and refer to them in the replacement string</strong>? &#8211; Yes, use (pattern) and then refer to your patterns as \1, \2, \3 and so on.</li><li><strong>If the string is ‘old old old’ and I run ’s/old/new’, I get ‘new old old’ as the result. I need ‘new new new</strong>‘. &#8211; You forgot the global modifier, which would replace every occurrence of the pattern with the substitution. ’s/old/new/<strong>g</strong>‘ will work.</li><li><strong>But I want ‘old old new’ from the previous example</strong>. &#8211; Just use the numeric modifier saying you want the third occurrence to be replaced. ’s/old/new/<strong>3</strong>‘ will work.</li><li><strong>I wrote a rather complex sed script. How do I save and run it</strong>? &#8211; Assuming that your file is named myscript1.sed, you can invoke sed -f myscript1.sed.</li><li><strong>How do I delete trailing whitespaces from each line</strong>? &#8211; sed ’s/[ \t]*$//’ Here we’re replacing any occurrence of a space or a tab with nothing. Check <a
href="http://www.catonmat.net/blog/wp-content/uploads/2008/09/sed1line.txt">sed one-liners</a> for more examples.</li><li><strong>How do you print just a few first lines of the file</strong>? &#8211; sed 1q will give you just the first line, sed 10q the first 10 lines.</li><li><strong>How do you replace a pattern only if it’s found, so that it’s executed faster</strong>? &#8211; Nest the replacement statement: sed ‘/old/ s/old/new/g’ file.txt</li></ol></div><p>via <a
href="http://www.techinterviews.com/basic-sed-tricks">Basic sed tricks | TechInterviews</a>.</p> ]]></content:encoded> <wfw:commentRss>http://www.freequestionbank.com/question/basic-sed-tricks/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Objective Questions In Botany</title><link>http://www.freequestionbank.com/question/objective-questions-in-botany/</link> <comments>http://www.freequestionbank.com/question/objective-questions-in-botany/#comments</comments> <pubDate>Sat, 28 Mar 2009 08:06:28 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Exam]]></category> <category><![CDATA[Question]]></category> <category><![CDATA[botany]]></category> <category><![CDATA[paper]]></category><guid
isPermaLink="false">http://www.freequestionbank.com/?p=488</guid> <description><![CDATA[1. Which one of the following is a green house gas? Carbon dioxide
2. The tallest living tree is Sequoia
3. Which ...]]></description> <content:encoded><![CDATA[<p>1. Which one of the following is a green house gas? Carbon dioxide<br
/> 2. The tallest living tree is Sequoia<br
/> 3. Which on of the following plants is biennial? Carrot<br
/> 4. Sea weeds are an important source of iodine<br
/> 5. Polio is caused by virus<br
/> 6. “Ozone” as such protects the earth from ultraviolet sunrays<br
/> 7. The climatic changes, soil erosion and decreased rainfall is due to deforestation<br
/> 8. AGHARK is a quality assurance for agricultural products<br
/> 9. Refrigeration is a process which slows down the bacterial growth<br
/> 10. The blue-green algae are photoautotrophs<br
/> 11. Which of the following acts as a coenzyme? Zn++<br
/> 12. The phenotypic ratio of monohybrid cross is 3:1<br
/> 13. Smallest measuring unit in cytology is angstrom<br
/> 14. It is believed that live evolved in its early stage under oxygen-free condition. Which of the following organisms might have been able to survive in that environment? obligate anaerobic bacteria<br
/> 15. Sexual reproduction is absent in which of the group of fungi mentioned below? Deuteromycetes<br
/> 16. One of the characteristics that differentiates prokaryotes from eukaryotes is Membrane-bound organelles<br
/> 17. The most common method of vegetative reproduction in usnea is soredia<br
/> 18. Which of the fungi mentioned below is employed as a genetic tool? Neurospora<br
/> 19. Heterotrichous habit is exhibited by Ectocarpus<br
/> 20. Photosynthesis cannot take place in ultraviolet light<br
/> 22. What is the cause for deforestation? rapid explosion of human and live stock population<br
/> 23. How soil get eroded? by floods and rains<br
/> 24. The shape of Human Immuno deficiency Virus (HIV) is spherical in shape<br
/> 26. Polyploidy is most common in plant kingdom<br
/> 27. In photosynthesis, the light reaction is known as hill reaction and the dark reaction is known as Blackman reaction<br
/> 28. DNA structure was first described by Watson and Crick<br
/> 29. What is an example for cymose in florescence? Crotalaria<br
/> 30. Rice is a stape food of people of India. In the milling process, polishing is the final process and the polished rice is rich in starch<br
/> 31. The ratio 9:3:3:1 represents a ratio of dihybrid<br
/> 32. Which one of the following is correctly matched? Manihot – Grain<br
/> 33. Gnetum is a climber<br
/> 34. Largest living tree on earth is sequoia<br
/> 35. Protonema appears in the life cycle of Riccia<br
/> 36. Sugar is obtained from all these<br
/> 37. When a plat cell is placed in a sugar solution …. takes place. osmosis<br
/> 38. The kinds of ribose nucleic acid present in any plant cell will be 2<br
/> 39. Vernation means the arrangement of leaf outside the bud<br
/> 40. In plants, energy is produced during photosynthesis<br
/> 41. The yellowing of leaf is caused by the deficiency of iron<br
/> 42. Identify the correct sequence of evolution in plants: Thallophyte – Bryophyte &#8211; Pteridophyte-Gymnosperms<br
/> 43. The vascular bundles arranged in a cycas petiole is inverted omega (U) shaped<br
/> 44. Which one of these is correctly matched? Paddy – Blast disease<br
/> 45. When the soil is rich in organic debris, it is known as Humus soil<br
/> 46. A plant growing inside another plant of different species symbiotically is called Endophyte<br
/> 47. “Survival of the fittest” was proposed in his theory of evolution by Darwin<br
/> 48. In rice polish which is left as a residue none of the above<br
/> 49. This pteridophyte produces two kinds of spores selaginella<br
/> 50. Lepidodendron is a fossil which represents stem<br
/> 51. These cells are loosely arranged in a plant body parenchyma<br
/> 52. Maximum rate of photosynthesis occurs in white light<br
/> 53. Resupination is a characteristic feature to the flowers of this family<br
/> orchidaceae<br
/> 54. Gemma cup is present in Riccia<br
/> 55. Which one is correctly matched? Bengal gram-shrub<br
/> 56. How many types of cell division are there in plant cells? 3<br
/> 57. Flowers emit fragrance to attract insects<br
/> 58. Recently pattern right was given to which plant in America Turmeric<br
/> 59. Reduction in chromosome number occurs after Meiosis<br
/> 60. The male cone of cyas consists Microsporangia<br
/> 61. Botanical name of paddy is Oryza sativa<br
/> 62. The male filament of oedo gonium is known as Nannandrium<br
/> 63. Guard cells in the stomata help in transpiration<br
/> 64. Syngenesis means union of filaments<br
/> 65. Identify the correct sequence of protein synthesis Messenger RNA – Polyribosomes – aminoacid+tRNA-Polypetide<br
/> 66. The study of individual plant throughout their life – history in relation to the environment is called synecology<br
/> 67. Which one of the following is correctly matched? Jute-phloem fibre<br
/> 68. Fern phrothallus is Gametophyte<br
/> 69. What is the correct sequence of the life cycle of fern? Zygote-Sporophyte-Spore-Gametophyte<br
/> 72. Which of the following lights is necessary for photosynthesis? red<br
/> 73. The fruit of Tomato belongs to the type? berry<br
/> 74. The edible part of Cauliflower is flower<br
/> 75. The genetic material of a cell resides in DNA<br
/> 76. An ecosystem has two components, namely biotic and abiotic<br
/> 77. Development of a sporophyte directly from the sporophytic tissue is called double fertilization<br
/> 78. Root hairs absorb water from the soil on account of difference is osmotic concentration<br
/> 79. Pollination by birds is known as ornithophily<br
/> 80. Autotrophs in an ecosystem are called producers<br
/> 81. A dye is prepared from indigofera<br
/> 82. What is the phenotypic ratio of complementary genes in pea? 9:7<br
/> 83. Thymidine is a nitrogenous base found in DNA<br
/> 85. The first effective vaccine against polio was prepared by Jone E.Salk<br
/> 86. Which among the following is a non photosynthetic pigment? chlorophyll – a<br
/> 87. Unit of classification is family<br
/> 88. Plant that grow in saline water are called halophytes<br
/> 89. Diatomaceous earth is a deposit of organisms of bacillariophyceae<br
/> 90. The physiological phenomenon considered as a “necessary evil” in plants is transpiration<br
/> 91. The type of phyllotaxy in caltropis is opposite decussate<br
/> 92. Franks produces root nodules in casuarinas<br
/> 93. Red tides are caused by red algae<br
/> 94. The development of fruit without fertilization is known as parthenocarpy<br
/> 95. The agent that carries informantion from DNA to RNA is m-RNA<br
/> 96. To induce callus which one of the following chemicals is necessary? NAA<br
/> 97. Arachis hypogaea (groundnut) belongs to the family Musaceae<br
/> 98. A definite number of cells arranged in a specific manner in an algal colony is known as thallus<br
/> 99. Which of the groups of plants mentioned below consists of phycobiont and mycobiont living together as an unit? lichens<br
/> 100. Which of the scientists mentioned below for the first time, observed and described bacteria?<br
/> Anton Van Leewenhoek</p><p>101. The cambium present within a vascular bundle is known interfascicular cambium<br
/> 102. The outermost layers of rice grain endosperm rich in proteins, vitamins and minerals are known as Aleurone layers<br
/> 103. Syngenesious anther is an important characteristic feature of<br
/> 104. Heterospory leading to the establishment of seed habit is observed in selaginella<br
/> 105. Which of the monocots mentioned below shows anomalous secondary thickening? Asparagus<br
/> 106. The botanical name for neem is Azadirachta indica<br
/> 107. Meristeles are usually present is Ferns<br
/> 108. Winged pollen grains are present in Pinus<br
/> 109. Aprogeotropic and coral-like roots are produced in taxus<br
/> 110. What drug is experimented in the treatment of AIDS? AZT<br
/> 111. Lysosomes are known as Suicide bags<br
/> 112. The algae used by calvin and his co-workers in elucidating the pathway of carbon in photosynthesis is Chlorella<br
/> 113. Heredity characters are carried to the next generation by chromosome<br
/> 114. Nobel prize for the study of the structure of DNA was won by Watson and Crick<br
/> 115. Global warming is due to the release of this gas carbon dioxide<br
/> 116. The secret behind Mendel’s success in his experiments lies in this there are 7 pairs of strikingly contrasting characters in the garden peaplant<br
/> 117. This is used as a biofertilizer Azolla<br
/> 119. Choose the appropriate one connected with heterospory ophioglossum, marsilea<br
/> 120. Which one of the following is responsible for guttation in Ruhr leaf? transpiration<br
/> 121. The bacterium Escherichia coli is present in the colon of human beings<br
/> 122. Turpentine is obtained from pinus<br
/> 123. The metal ion involved in stomatal regulations is potassium<br
/> 124. Which one of the following is concerned with the production of ATP molecules? cisternae<br
/> 126. The ratio 3:1 is obtained in monohybrid cross<br
/> 128. Which of the following is not correctly matched? Ethylene – Fruit ripening<br
/> 129. Coralloid roots are found in cycas<br
/> 130. Pulses contain large amount of proteins<br
/> 131. Which one is a xerophyte? Ceratophyllum<br
/> 132. Which of the following diseases is not caused by bacteria? influenza<br
/> 133.Which one of the following is correctly matched? Iwanoski-Discovery of virus<br
/> 134. Gymnosperms are open seeded plants<br
/> 135. Reduction division is Meiosis<br
/> 136. The female sex organ of polytrichum is Archegonium<br
/> 137. DNA mode was first proposed by Watson and Crick<br
/> 139. Mendel did his hybridization experiments in this plant Pea plant<br
/> 140. The sun’s energy is fixed in the world by green plants<br
/> 141. Fixation of nitrogen in the soil is done by bacteria<br
/> 142. Plasmodium belong to this group protozoa<br
/> 143. Genes are located on chromosomes<br
/> 144. Select the correct order in the life-cycle of a bryophyte Sporophyte-Spores-Fertilization-Gametophyte<br
/> 145. Which one of the following is correctly matched? Tetanus-virus<br
/> 146. The botanical name of Bengal gram is Cicer arietnum<br
/> 147. Select the correct order of stages in mitosis: Prophase, anaphase, Metaphase, Telophase<br
/> 148. A pure breeding dwarf pea plant (tt) on hybridization with a pure breeding tall plant (TT ) will produce dwarf and tall plants in the ratio (in F2 generation) of 1:3<br
/> 149. The male sex organ in chara is called as Globule<br
/> 150. Bacteria were first discovered by Anton Van Leeuvenhoek</p><p>151. Which one of the following is correctly matched? Polytrichum-Algae<br
/> 152. Which one of the following tissues conducts food material in plants? phloem<br
/> 153. Penicillin is a/an antibiotic<br
/> 154. Polio is caused by virus<br
/> 155. The energy needed by the living organism is ultimately obtained from<br
/> sum<br
/> 156. In plants, water is conducted by xylem<br
/> 157. Peristomes are present in<br
/> polytrichum<br
/> 158. The weed which reached India as a contaminant of wheat imported unfrt PL 480 scheme is parthenium<br
/> 159. Polio is caused by a virus<br
/> 160. Tobacco contains a poisonous substance called nicotine<br
/> 161. Palaeobotany deals with the study of Fossil plants<br
/> 162. The work ‘Biosphere’ means total assembly of all living organisms<br
/> 163. Microbial world was discovered is the year 1673<br
/> 164. Gametophtyes are all these<br
/> 165. Presence of a cambium indicates open vascular bundle<br
/> 166. The phyllotaxy of Gnetum is opposite<br
/> 168. The sperm in cycas is top-shaped and multiciliate<br
/> 169. Circinate vernation of leaves is a typical character of ferms<br
/> 170. All fungi are always heterotrophs<br
/> 171. Why blue green algae are called cyano bacteria? because they are prokaryotic<br
/> 172. The gymnosperms resemble angiosperms in having presence of ovules<br
/> 173. The disease caused by the fungus colletotrichum falcatum is known as red rot<br
/> 174. Dendrochronology is the study of age of a tree with the help of annual rings<br
/> 175. Clove is obtained from which of the plants parts given below? flower buds<br
/> 177. Which of the algae given below grows in sewage ponds? volvox<br
/> 178. Which of the plant groups mentioned below are popularly known as amphibious of plant kingdom? bryophytes<br
/> 179. DNA double helical structure was described for the first time by Watson and Crick<br
/> 180. Cataclytically active enzyme is<br
/> called apoenzyme<br
/> 181. Water droplets at the tip of the leaf are due to guttation<br
/> 183. The age of a tree can be determined by counting the annual growth rings<br
/> 184. The name “Traveller’s palm” refers to revenala madagas cariensis<br
/> 185. Phyllode is seen in the plant Acacia melanoxylon<br
/> 186. Polyploids can be artificially induced by colchicines<br
/> 187. Parthenocarpy can be induced by IAA<br
/> 188. Raphanobrassica was discovered by Karpachanko<br
/> 189. When FADH2 is oxidized, the following number of ATP is produced 2<br
/> 190. Half leaf experiment proves the essentiality of CO2<br
/> 191. The universal Co2 acceptor molecule is called PEP<br
/> 192. In anoxygenic photosynthesis, which of the following takes part as electron donors? H2S<br
/> 193. Velamen root is found in vanda<br
/> 194. Rosewood is obtained from dalbergia latifolia<br
/> 195. Penicillin was invented by A.Fleming<br
/> 196. Spirulina which is a source of SCP is a blue green algae<br
/> 197. Chlorophyll is formed in the presence of magnesium<br
/> 198. Hormone involved in phototropism is Auxin<br
/> 199. Father of genetic is Gregor Mendel<br
/> 200. The main function of RNA is protein synthesis</p><p>201. An example of a Hesperidium is Citrus<br
/> 202. Which of these is an antibiotic?<br
/> aureomycin<br
/> 203. The number of dry plants in the herbarin found in the Indian botanical garden at kolkata is about 1 million<br
/> 204. Mycoses are diseases caused by fungi<br
/> 205. Which one of the following is not a correct pair in relation to function? Golgi complex-breakdown of complex molecules<br
/> 206. The parasitic algae is cephaleuros<br
/> 207. In which plant are scleroids abundant? none of these<br
/> 208. The fruiting body namely, cleistothecium is formed in puccinia<br
/> 209. If the genetic name of the fossil<br
/> plant ends with “dendron” or “xylon” it denotes the stem of the fossil<br
/> 210. Sewage treatment is carried out with the help of bacteria<br
/> 211. “Ikebana” pertains to floral arrangement<br
/> 212. The bacterium which lives in the human intestine is E. coli<br
/> 213. The first to isolate a plant virus is W.M. Stanley<br
/> 214. National Botanical Research institute is situated at Coimbatore<br
/> 215. In plants, the radial transport of food, water and mineral salts is performed by secondary phloem<br
/> 216. Grafting cannot be practiced in monocotyledonous plants because they do not have cambium<br
/> 217. Mycology is the study of fungi<br
/> 218. The group of plants containing algal and fungal partners in association are called Thallophytes<br
/> 219. The largest cell found in plant kingdom is that of Acetabularia<br
/> 220. Electron microscope was invented by Knoll and Ruska<br
/> 221. Apple is false fruit<br
/> 222. Genes are located on the chromosomes in a linear manner<br
/> 223. Soil erosion leads to loss of vegetation<br
/> 224. The plant used by Mendel in his early experiments was Pea plant<br
/> 225. The medicine prepared by genetic exchange in bacteria is Insulin<br
/> 226. Penicillin was discovered by Alexander Fleming<br
/> 227. The leaves with sori are called as sporophylls<br
/> 228. Saprophytic organism is fungi<br
/> 229. The plant used by Mendel for his research was pea plant<br
/> 232. Which one of the following statements is wrong about meiosis? it happens in the meristematic region<br
/> 235. Which one of the following plants is used in the treatment of Jaundice? Eclipta<br
/> 236. Which of the following is wrongly matched? Streptococcus lactis-Vinegar production<br
/> 237. The smallest angiosperm is wolfia<br
/> 238. Identify the correct sequence of following Glycolysis, Krebs’ cycle, Electron transport ATP synthesis<br
/> 239. Which one of the following is correctly matched? Ribosomes-protein synthesis<br
/> 240. The stiffness of paddy straw is due to silica<br
/> 241. Which of the following plants is endemic? Ginkgo<br
/> 242. The wood is made of primary xylem<br
/> 244. “Berry” fruit is found in Tomato<br
/> 245. DNA structure was discovered by Watson and crick<br
/> 246. The growing of plants under soilless condition is called? hydrophonics<br
/> 247. Spore is a asexual reproductive cell<br
/> 248. Quickly available respiratory substrate is starch<br
/> 249. In nature, ammonification takes place in ditch<br
/> 250. What kind of plant is an ‘alga’? chlorophyllous</p><p>251. Ganong’s photometer is used in the study of transpiration<br
/> 252. Coconut is dispersed in nature by water<br
/> 253. Pillar roots of Banyan help in the support of the branches<br
/> 254. The organic compounds that contain nitrogen is protein<br
/> 255. Which one of the following is a climax forest? Thorn forest<br
/> 256. Red colour of riped tomato is due to chromatophore<br
/> 257. Cultivation of trees and vegetables is Arboriculture<br
/> 258. Jaya is variety of Cotton<br
/> 259. Absorption of water by plants takes place when the sun shines<br
/> 260. Which are the most important element necessary for plant growth? Oxygen, Iron, Phosphorus<br
/> 261. Osmosis is synonymous with none of these<br
/> 262. What is the first stable product of photosynthesis? sugar<br
/> 263. The water absorbed by the plant moves through xylem tissues<br
/> 264. Ganong’s photometer is used to measure the loss of water by plants<br
/> 265. What does phloem tissue have? sieve elements<br
/> 266. Piliferous layer of root is produced from epidermal cells<br
/> 267. Endodermis is found as a single layer of cells forming the outermost layer of the stele<br
/> 268. The fascicular cambium is present in the stem of sorghum<br
/> 269. Dixon and jolly formulated their theory on the ascent of sap in plants based on union of water molecules<br
/> 270. Find out the only plant among the four give below. Which is not a xerophyte? Euphorbia tirucally<br
/> 271. Which do you find the largest number of Eucalyptus species? india<br
/> 280.The electron transport chain is a group of molecules located in the<br
/> outer membrane of mitochondria<br
/> 281. What is penicillium? fungus<br
/> 282. Inside a seed, the plant remains in a/an dormant state<br
/> 283. Plasmids are used as vectors in gene transfer. They are present in certain bacteria<br
/> 284. Transgenic plants and animals can be produced through genetic engineering<br
/> 285. Guttation is a process in plants by which excess of water is removed as water drops<br
/> 286. Ability to fix atmospheric nitrogen is found in some blue green algae<br
/> 287. Opposite decussate phyllotaxy is seen in Calotropis<br
/> 288. The natural system of classification was postulated by Bentham and hooker<br
/> 289. In plants, energy is produced during the process of photosynthesis<br
/> 290. In which of the following the pollen grains are lilberated as clouds of yellow powder and also called “Sulphur shower”? Pinus<br
/> 291. In Botany, the Latin names are used because in whole world there would be only on name for one plant<br
/> 292. The flowers are variously coloured to attract insects<br
/> 293. Agar-Agar is derived from Gelidium<br
/> 294. The plant which is used as medicine for jaundice is phyllanthus<br
/> 295. The most commonly used higher plant vector for gene transfer is Ti plasmid<br
/> 296. Genetic material kof virus is/are DNA (or) RNA<br
/> 297. Primary organs of photosynthesis are leaves<br
/> 298. The abundance of blue-green algae in paddy fields results in saving on potash<br
/> 299. Sessile leaves are seen in Calotropis<br
/> 300. Angiosperms are spermatophytes</p><p>301. The green leaves performing photosynthesis are know as foliage leaves<br
/> 302. Mango is an example for tree<br
/> 303. Mitosis and Meiosis are absent in bacteria<br
/> 304. Cotton fibres are obtained from cotton fruits<br
/> 305. Bacteria which are spherical in shape are known as coccus<br
/> 306. Viruses are in between non-living and living organisms<br
/> 307. Thallophytes used as food include algae and fungi<br
/> 308. The structure of DNA was discovered by Watson and crick<br
/> 309. Which of the following flowing is unisexual? Bottle guard<br
/> 310. The substrate most important for genetic engineering is Nucleous<br
/> 311. Which of the following is a prokaryote? Blue &#8211; green algae<br
/> 312. With what technology do you associate ’callus’ with? pollen analysis<br
/> 313. Penicillin was discovered by Alexandedr Flemming<br
/> 314. Which of the following is a bacterial disease? Tuberculosis<br
/> 315. Which one of the following is a woody climber? Gnetum<br
/> 317. Which one of the following is not a pulse? Chloris barbata<br
/> 318. E.coli is living in the human intestine<br
/> 319. Which one of the following is wrong? Man is not responsible for the destruction of natural resource<br
/> 320. Direct cell division is otherwise known as Amitosis<br
/> 321. Which medicine is used in the treatment of AIDS? Azidothymidine<br
/> 323. Founder of Binomial nomenclature is Carl Linnaeus<br
/> 324. The roots coverd with fungal hyphens are Mycorrhizal roots<br
/> 326. We should not sleep under the tree during night because the trees release more carbon dioxide<br
/> 327. Which of the following is used in the preparation of digestive tablets? yeasts<br
/> 328. The bacterial action in milk is acidic<br
/> 329. Streptomycin is produced by fungi<br
/> 330. One of the following is called the vascular cryptogams none of these<br
/> 331. Disease causing bacteria a called pathogenic<br
/> 332. Ergot is obtained froms claviceps purpurea<br
/> 333. after development ovule forms seed<br
/> 334. Which of the following can be recyled metal<br
/> 335. The mechanism of heredity was explained first by Mendel<br
/> 336. Viruses are inert outside host cell<br
/> 339. The genetic material of a cell resides in DNA<br
/> 340. Which part of cinchona is used for malaria cure? bark<br
/> 341. Arachis hypogea is the binomial name of groundnut<br
/> 342. Antibiotic penicillin is obtained from fungi<br
/> 345. A bacteriophage is a virus that attacks bacteria and destroy them<br
/> 346. Ribosomes in a cell play a significant role in protein synthesis<br
/> 347. Baker’s yeast is saccharomyces cerevisae<br
/> 348. The tallest tree occurs in gymnosperms<br
/> 349. The poisonous substance that is present is tobacco is nicotine<br
/> 350. Which of the following is used for culture medium of bacterial growth? Agar-agar</p><p>351. one of the following is the simplest land plant Bryophytes<br
/> 352. Bacteria generally multiply by binary fission<br
/> 353. Agaar- agar is obtained from gelidium<br
/> 354. Which of th following grows on wet bread? yeasts<br
/> 355. Nitrogen fixation is done by blue-green algae<br
/> 356. Which bacteria produce vinegar in sugar solution? acetobacter aceti<br
/> 357. Penicillin was discovered by Alexander Fleming<br
/> 358. Yeasts help in the production of alcohol<br
/> 359. Many pulses are obtained from<br
/> plants of the family Fabaceae<br
/> 360. Emasculation is removal of stamens<br
/> 361. “Donann equilibrium”, a theory which explains the physiological phenomenon is called mineral absorption<br
/> 362. Bacterial action changes dead leaves into humus<br
/> 363. Which of the following is not a fruit? Potato<br
/> 364. Litmus is obtained from an algae<br
/> 365. ‘Gemma Cup’ is found in Marchantia<br
/> 366. The plants which include underclass hepaticopsida are generally called as liver worts<br
/> 367. Which of the following genera possesses long shoots and dwarf shoots? cycas<br
/> 368. Each virus is made up of nucleic acid and protein<br
/> 369. Water of coconut is degenerated liquid endosperm<br
/> 370. A herbarium is a centre for the preservation of dried specimen of plants<br
/> 371. Agar-agar is obtained from Geledium<br
/> 372. Golgi bodies of plant cells are also called as Dictyosoms<br
/> 373. The nucleic acids of virus must be Either DNA (or) RNA<br
/> 374. Pollinia are found in one of the following families Apocyanacease<br
/> 375. The system of binomial nomenclature was proposed by Linnaeous<br
/> 377. Bacteria which convert atmospheric nitrogen into nitrates are denitrifying bacteria<br
/> 378. Parallel venation is found in paddy<br
/> 379. Hard fibres are generally got from tropical dicot plants<br
/> 380. Cell membrane fo plant cells are also called as plasma membrane<br
/> 381. First land inhabiting plants are Gymnosperms<br
/> 382. The seed germination type found in pinus is hypogeal<br
/> 383. The process by which plants lose water by liquid status is transpiration<br
/> 384. The root in mangrove tree is respiratory<br
/> 385. Mango is a drupe<br
/> 386. Chlorosis is linked with chlorophyll<br
/> 387. Paddy is a caryopsis<br
/> 388. Plant viruses are named as phytophage<br
/> 389. TMV stands for Tobacco mosaic virus<br
/> 390. The bacterium found in the large intestine is E.com<br
/> 391. The bacterium present in the root nodule of leguminous plant is Rhizobium<br
/> 392. Anaerobic decomposition of protoin is called ammonification<br
/> 393. The father of Genetics is Mendel<br
/> 394. The genotypic ratio of monohybrid ratio is 1:2:1<br
/> 395. The double helix model of DNA was proposed by Watson and crick<br
/> 396. Common cold is viral disease<br
/> 397. W.M. Stanley got Nobel Prize for virus<br
/> 398. Apical dominance in higher plants is due to hormones<br
/> 400. The pollen grains of flowers pollinated by insects are rough and sticky</p><p>401. Soyabean contains a high degrees of proteins<br
/> 402. The age of a tree can be determined by counting the growth rings of its stem<br
/> 404. Ground becomes slippery during the rainy season due to green algae<br
/> 405. Which one of the following is a useful functional association between fungi and the roots of higher plants?mycorrhiza<br
/> 406. Carbon is available to plants as carbon dioxide<br
/> 407. Photosynthesis is a bio-chemical process for the transfer of solar energy to food chain cycle<br
/> 408. The fruit in member of poaceae is Caryopsis<br
/> 409. The function of flower is reproduction<br
/> 410. Penicillium is generally known as Fungus<br
/> 411. The biggest herbarium of our country is located in Kolkata<br
/> 412. Polytrichum plants belong to bryophyte<br
/> 413. Which of the following flowers is sessible? mustard<br
/> 414. Adiantum sporophytic plants have chromosome type of diploid<br
/> 415. In which of the following is xerophytic present? calotropis<br
/> 416. The study of inflorescence, flowers, fruits and seeds is known as reproductive morphology<br
/> 417. In insectivorous plants which of the following elements is absenst or deficent Nitrogen<br
/> 418. Viruses chemically called as nucleoproteins<br
/> 419. Penicillin was discovered by Alexander Fleming<br
/> 420. The metal present in chlorophyll is magnesium<br
/> 421. Based on the cellular type the algae chlorella belongs to Both (A) and (B)<br
/> 422. Three major types of sexual reproduction found in algae may be isogamy, anisogamy and oogamy<br
/> 423. Those algae which grow in hot spring at about 85?C temperature are called as<br
/> 424. To which of the following families do all pulses belong? Sporophytic phase<br
/> 425. The evergreen plant body of gymnosperms is sporophytic phase<br
/> 426. The ovules of an ovary are not naked in which of the following groups? angiosperms<br
/> 427. Gigantism is a result of Auto-polyploidy<br
/> 428. The most important purpose of insects to visit a flower is to collect honey<br
/> 429. The inflorescence axis in banana is used to remove kidney stones<br
/> 430. Who first discovered the penicillin? Alexanderd Fleming<br
/> 431. Epiphytes are plants which depend an other plants only for shelter<br
/> 432. Who has discovered the cell? Robert Hook<br
/> 433. Which one of the following plants is an example of herb?Hibiscus<br
/> 434. The sharp and pointed outgrowth present on the stem of rose are called spines<br
/> 435. ‘AIDS’ is caused by virus<br
/> 436. Streptomycinis produced from Streptomyces griseus<br
/> 437. Iodine is obtained from Gelidium<br
/> 438. The broad leaves of tall trees absorb rain clouds<br
/> 439. Diffusion means the movement of molecules fro a region of greater concentration to lesser concentration<br
/> 440. In some plants fruit formation takes place without fertilization which is called as parthenocarpy<br
/> 441. Centrl Rice Research Institute is in Cuttack<br
/> 442. The bacterium which has flagella all over the body is called as peritrichous<br
/> 443. Moistur absorbing roots are seen in vandal<br
/> 444. Secondary growth (or) width enlargement is usually absent in Monocotyledons<br
/> 445. The number of plant species described on our earth is overd 4,00,000<br
/> 446. The first person to see a cell under microsecope was Hooke<br
/> 447. The drug chloromycetin is used for which disease?Tuberculosis<br
/> 448. Leprosy is caused by bacteria<br
/> 449. The study of external form of a plant is known as Morphology<br
/> 450. A group of cells similar in structure and function is tissue</p><p>451. Those flowers which have both male and female reproductive parts are called unisexual<br
/> 452. The other nama of the plant taxonomy is systematic botany<br
/> 453. Plants takes nitrogen in the form of nitrates<br
/> 454. Edible fungi are Agaricus<br
/> 455. One of the following is useful for cheese making penicillium<br
/> 456. Waterblooms are produced by algae<br
/> 457. Viruses are all of these<br
/> 458. Bacteria reproduce mostly asexually<br
/> 459. Atmospheric CO2 can be reduced by the process of photosynthesis<br
/> 460. which of the following cannot grow indeserts of Rajasthan? Banana<br
/> 461. Bacteria are both (A) and (B)<br
/> 462. Soil conservation is the process where soil is protected against erosion<br
/> 463. Phytology is the study of algae<br
/> 464. The largest flower is Rafflesia<br
/> 465. The molecule with high energy phosphate bond in the cell is ATP<br
/> 466. The root nodules containing Rhizobia occur in Fabaceae<br
/> 467. Pasteurization of milk destroys its pathogenic bacteria<br
/> 468. Atmospheric nitrogen is fixed in leguminous roots by bacteria<br
/> 469.Gymnosperms are characterized by lacking ovaries<br
/> 470. In food making industry the product of yeast culture utilised is<br
/> ethyl alcohol<br
/> 471. One of the following is responsible for smut disease ustilago<br
/> 472. Sexual reproduction is about in blue-green algae<br
/> 473. Algin is obtained from brown algae<br
/> 474. The virus which attacks E.coli is termed coliphage<br
/> 475. Laminaria is an important source of iodine<br
/> 476. ‘Pond silk’ is the common name of spirogyra<br
/> 477. Pneumonia is caused by one of the following bacteria<br
/> 478. Cotton fibre is obtained from the fruit<br
/> 479. The largest producer of groundnut is India<br
/> 480. India’s largest mineral resource is coal<br
/> 481. The gas evolved by leaves during photosynthesis is oxygen<br
/> 482. After fertilization ovary is transformed into fruit<br
/> 483. Green trees of the forests are generally called as food chain primary producers<br
/> 484. Streptomycin was discovered by waksman<br
/> 485. Kelp is brown algae<br
/> 486. Habitat of penicillium is organic substance<br
/> 487. Monocotyled are chaaracterised by fibrous root system<br
/> 488. Typhoid is caused by bacteria<br
/> 489. The ovules in gymnosplerms are exposed<br
/> 490. Cell division useful for gamete formation is meiosis<br
/> 491. Herbicide is used to kill the weeds<br
/> 492. Tap root is positively geotropic<br
/> 493. Seedless fruits are seen in all of these<br
/> 494. Most advanced plants in the plant kingdom are angiosperms<br
/> 495. Fibres are taken from plant as sclerenchyma cells<br
/> 496. The process in which fruit is formed without fertilization is know as parthenocarpy<br
/> 497. Calotropis is an example of the following phyllotaxy opposite and decussate<br
/> 498. Phylloclade is a modified stem<br
/> 499. Which of the following diseases is likely to spread in the entire community. If a leaky septic tank contaminates the water supply? Cholera<br
/> 500. Where would the bacterium E.coli be readily found? human intestine</p><p>501. Quinine is made from cinchone bark<br
/> 502. Phylllanthus nirui is a medicinal herb and it is used to cure jaundice<br
/> 503. The dark reaction was worked out by an American scientist called Melvin Calvin<br
/> 504. “Breathing roots” of mangrove plants are also called both (B) and (C)<br
/> 505. Hydroponics is plant growth in liquid culture medium<br
/> 506. Red tides are causd by red dinoflagellates<br
/> 507. In angiosperms ovules develop into seeds<br
/> 508. ‘Tikka’ disease is found in groundnut<br
/> 509. The unicellular algae used in space craft to regulate oxygen supply is chlorella<br
/> 510. Who is the well known Indian paleobotanist? Birbal sahni<br
/> 511. Sharbati, Sonara, Kalyan Sona are the improved varieties of wheat<br
/> 512. An algae yielding single cell protein of economic importance is spirulina<br
/> 513. The process of transfer of desirable characters from on especies to other is known as selection<br
/> 514. Wide variety of plants are observed in this tropical regions<br
/> 515. Mycotoxins are pollutants because they affect most commonly water<br
/> 516. Orchards are fruit garden<br
/> 517. Foreign countries want to get plant materials of this plant from our country keeping in view the problem of chemical pesticides Azadirachta indica (neem)<br
/> 518. Nitrogen fixation is generally brought about by Bacteria and blue green algae<br
/> 519. “Pasteurization” means boiling and cooling to prevent microbial spoilage<br
/> 521.Why is sprouted gram considered more nutritious? germinating seeds produce enzymes which are a rich source of protein<br
/> 522. Which metal is present in green leaves? Magnesium<br
/> 523. Pollinium found in the family Asclepiadaceae and Orchidaceae<br
/> 524. Legume root nodule contains a protein pigment known as Leghaemoglobin<br
/> 525. From the following,which one is edible fungi? Agaricus<br
/> 526. Which type of cell gives mechanical support to the plant?Sclerenchyma<br
/> 527. A sequence of nucleotides that specifies a particular polypeptide chain is called as gene<br
/> 528. Cell wall is chemically made up of lignin, pectin and cellulose<br
/> 529. Endocarp of fruit wall is innermost layer of fruit wall<br
/> 530. Which group of organism is responsible for enriching soil fertility is an area? Micro-organisms<br
/> 531. Amphibious plants with non-vascular nature group is called as bryophytes<br
/> 532. Biggest herbarium located in south India is coimbatore<br
/> 533. Smallest flowering plant is wolffia<br
/> 534. Economic use of the genus araucaria gymnosperm plant is ornamental plant<br
/> 535. First plant viruses were discovered in tobacco<br
/> 536. The most characteristic feature of arthropoda is jointed appendages<br
/> 537. The most successful vector in higher plants Ti-plasmid<br
/> 538. one of the following is essential for seed germination water<br
/> 539. The process by which RNA is formed from DNA is called transcription<br
/> 540. Some plants develop fruits without fertilization, this phenomenon is called parthenocarpy<br
/> 541.Which one of sthe following diseases is caused by viral infection? jaundice<br
/> 542. Symbolic nitrogen fixation is done by Rhizobium<br
/> 543. Lack of which element makes the plant insectivorous?Nitrogen<br
/> 544. Founder of binomial nomenclature is Cark Linnaeus<br
/> 545. Part of cinchona plant from which the drug quinine is obtained is bark<br
/> 546. Turbantine is obtained from the plants of coniferales<br
/> 547. Clover,the commonly used spice is obtained from the flower bud<br
/> 548. Which one of the following p;ants produces allergenic pollen grains? congress grass<br
/> 549. Opium is obtained from cannabis<br
/> 550. Which one of the following is correctly matched? photosynthesis –Starch synthesis</p><p>551. Which one of the following is a major green house gas? CO2<br
/> 552. The flow of genetic information from nucleic acid to protein is called transcription<br
/> 553. Oxygen in the universe is replenished higher plant photosynthesis<br
/> 554. Limnophylla haterophylla is an example of Amphibious plant<br
/> 555. An example for a parasitic algae is cephaleuros<br
/> 556. Atmospheric nitrogen can be fixed by Anabaena<br
/> 557. In dycot roots, xylem is exarch<br
/> 558. ‘The father of Genetics’’is G.J. Mendel<br
/> 559. Which one of the following is not a hormone? lodine<br
/> 560. Western Blot test is used in the diagnosis of AIDS<br
/> 561. Pulses are rich in proteins<br
/> 562. The pulp of the pear fruit is hard, because of the presence of sclereids<br
/> 563. Pedology refers to the study of soil<br
/> 564. The powerhouse of a cell is mitochondrion<br
/> 565. The following medicine is obtained from the bark of cinchona Quinine<br
/> 566. which one of the following is not a plant product? Rubber<br
/> 567. Which of the following is inpotant element of chlorophyll? Magnesium<br
/> 568. Grasses have fibrous roots<br
/> 569. Primary producers are green plants<br
/> 570. Match lists I correctly with list II and select you answer using the codes given below:</p><p>571. “callus’’ is referred as undifferentiated mass of tissues<br
/> 572. Number of chromosomes in an organism is maintained by the following division. meiosis<br
/> 573. Vascular cryptogams are pteridophytes<br
/> 574. The raw materials used in the fermentation activity, in yeasts is (are) sugars and fruit juices<br
/> 575. Artificial silk is prepared from synthetic fibres<br
/> 576. The plant involved in sericulture is mulberry<br
/> 577. Which one of the following is not correctly matched? Vessel –translocation of sugar<br
/> 578. Which one of the following is called as “ maiden hair fern’’? Adiantum<br
/> 579. A plant cel is distinguished from an animal cell by the presence of cell wall<br
/> 580. The sporophyte develops from zygote<br
/> 581.Geotropis can be demonstrated using clinostat<br
/> 582. Who introduces binomial nomenclature? Linnaeus<br
/> 583. Which one of the following is a complex tissue? Xylem<br
/> 584. Which of the following cereals was among the first to be used by man? Barley<br
/> 585. Transport of food materials in dicot plant is through Phloem<br
/> 586. In India, the Research Institute in palaeobotany Lucknow<br
/> 587. Distinction between plant and animal cells lies in respiration<br
/> 588. The powerhouse of the cell is Mitochondria<br
/> 589. Which part of the cauliflower is used as vegetable? Inflorescence<br
/> 590. Which of the following is not found in plants? Vitamin B12<br
/> 591. Insectilvorous plants capture insects for obtaining Nitrogen<br
/> 592. The five kingdom concept was proposed by Whittaker</p> ]]></content:encoded> <wfw:commentRss>http://www.freequestionbank.com/question/objective-questions-in-botany/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>SBI BANK CLERK NUMERICAL ABILITY</title><link>http://www.freequestionbank.com/question/sbi-bank-clerk-numerical-ability/</link> <comments>http://www.freequestionbank.com/question/sbi-bank-clerk-numerical-ability/#comments</comments> <pubDate>Sat, 28 Mar 2009 07:59:07 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Exam]]></category> <category><![CDATA[Question]]></category> <category><![CDATA[banking]]></category> <category><![CDATA[paper]]></category> <category><![CDATA[sbi]]></category><guid
isPermaLink="false">http://www.freequestionbank.com/?p=486</guid> <description><![CDATA[1. Minimum number that should be added to 23087 to make it completely divisible by 8 is ……
(a) 1 (b) ...]]></description> <content:encoded><![CDATA[<p>1. Minimum number that should be added to 23087 to make it completely divisible by 8 is ……<br
/> (a) 1 (b) 2 (c) 3 (d) 4<br
/> Ans (a)</p><p>2. The angles ABC are 5×0, 7×0 and 6×0 respectively. What is the measure of the ? BCA?<br
/> (a) 500 (b) 600 (c) 700 (d) cannot decide<br
/> Ans (c)</p><p>3. 390? 1000 ? 201 ? 34 = ?<br
/> (a) 895 (b) 1540 (c) 1620 (d) 1780<br
/> Ans (c)</p><p>4. Ratio of costs of a table and a chair is 5:3 . If the tables cost Rs. 500 more than the cost of chair’s, what is the chair’s cost?<br
/> (a) Rs. 1250 (b) Rs. 1750 (c) Rs. 1450 (d) Rs. 750<br
/> Ans (d)</p><p>5. 1646 ? 13 ? 18 + 249 = ? + 875<br
/> (a) 786 (b) 687 (c) 2486 (d) 2356<br
/> Ans (a)</p><p>6. A number when divided by 5 leaves the remainder 3. What is the remainder when the square of the same number is divided by 5?<br
/> (A) 9 (b) 3 (c) 0 (d) 4<br
/> Ans (d)</p><p>7. 12% 650 + ? % of 400 = 110<br
/> (a) 25 (b) 18 (c) 8 (d) 80%<br
/> Ans (c)</p><p>8. train ‘A’ crosses a 160 m standing train ‘B’ in 15 sec and a standing person in 9 sec. What is its speed?<br
/> (a) 96 km/hr (b) 72 km/hr (c) 84 km/hr (d) 92 km/hr<br
/> Ans (a)</p><p>9. The type of matrix<br
/> ?2 0 0<br
/> 0 ?3 0<br
/> 0 0 ?2<br
/> is?<br
/> (a) Scalar (b) Unit (c) Diagonal (d) Transpose<br
/> Ans (c)</p><p>10. The value of log 10000 is<br
/> (a) 4 (b) 8 (c) 5 (d) 6<br
/> Ans (a)</p><p>11. The sum of all numbers between 800 and 1100 which are divisible by 79 is<br
/> (a) 2846 (b) 2844 (c) 3844 (d) 3584<br
/> Ans (b)</p><p>12. The difference between the squares of any two consecutive integers is equal to<br
/> (a) Product of two numbers (b) Sum of two numbers<br
/> (c) Difference of two numbers (d) An even number<br
/> Ans (b)</p><p>13. 74 is divided into two parts so that 5 times one part and 11 times the others part are together equal to 454. Then the parts are<br
/> (a) 14,60 (b) 60,14 (c) 30,44 (d) 20,34<br
/> Ans (b)</p><p>14. If 4 workers can make 42 toys in 6 days, how many toys can 12 workers make in 3 days?<br
/> (a) 63 (b) 28 (c) 252 (d) 7<br
/> Ans (a)</p><p>15. The price of 349 coconuts are Rs 2094. What will be the price of 26 dozens of coconuts?<br
/> (a) Rs 1662 (b) Rs 1562 (c) Rs 2062 (d) Rs 1872<br
/> Ans (d)</p><p>16. The area of a rectangular field is 10 times of its length. If the breadth of the field is 10m, what is its length?<br
/> (a) 40m (b) 25m (c) 20m (d) data inadequate<br
/> Ans (d)</p><p>16. The salary of an employee was reduced by 40% first and then was increased by 50%. How much percent did he lose?<br
/> (a) 15% (b) 20% (c) 10% (d) 12%<br
/> Ans (c)</p><p>17. If 9 men &#038; 15 women can do a piece of work in 25 days, then 39 men and 10 women will complete the same work in<br
/> (a) 7 days (b) 6 days (c) 5 days (d) 4 days<br
/> Ans (c)</p><p>18. One person took a loan of Rs. 5000 for 3 yrs on simple interest. After three years he paid back Rs. 6200 including the principal and the interest accrued. Calculate the rate of interest.<br
/> (a) 6% (b) 7% (c) 8% (d) 7.5%<br
/> Ans (c)</p><p>19. The smallest number which when added to the number 1154 makes it a perfect square is<br
/> (a) 1 (b) 2 (c) 3 (d) 4<br
/> Ans (b)</p><p>20. The present age of Ramesh is ? of his father’s age. After 4 years, the sum of their ages will be 68. What is the present age of Ramesh?<br
/> (a) 10 yrs (b) 15 yrs (c) 16 yrs (d) 12 yrs<br
/> Ans (b)</p><p>21. Sheet metal required to make a hollow cone of height 24 cm and radius 7 cm is<br
/> (a) 407 cm2 (b) 250 cm2 (c) 704 cm2 (d) 400 cm2<br
/> Ans (c)</p><p>22. If 42 men can do a work in 15 days, how many men are required to complete it in 21 days?<br
/> (a) 24 (b) 36 (c) 30 (d) none of these<br
/> Ans (a)</p><p>23. Average marks in Maths in a class of 40 students is 45. Average of all the 30 boys is 50. Then the average marks obtained by the girls is<br
/> (a) 30 (b) 35 (c) 25 (d) none of these<br
/> Ans (a)</p><p>24. The largest angle of a quadrilateral is two times the smallest angle. If the angles form a series (a, a+d, a+2d, a+3d), the other two angles would be<br
/> (a) 600, 1200 (b) 800, 1000 (c) 900, 1000 (d) 700, 900<br
/> Ans (b)</p><p>25. A mixture of 20 kg of spirit and water contains 10% water. How much water must be added to this mixture to raise the percentage of water to 25%<br
/> (a) 4 kg (b) 5 kg (c) 8 kg (d) 30 kg<br
/> Ans (a)</p><p>26. A shopkeeper bought locks at the rate of 8 locks for Rs. 34 and sold them at 12 locks for Rs. 57. The number of locks he should sell to have a profit of Rs. 900 is<br
/> (a) 1400 (b) 1600 (c) 1800 (d) 2000<br
/> Ans (c)</p><p>27. A person travels equal distance with speed of 3 km/hr; 4 km/hr and 5 km/hr. and takes a total time of 47 minutes. The total distance (in km) is<br
/> (a) 1 (b) 3 (c) 4 (d) 5<br
/> Ans (a)</p><p>28. The perimeter of a circular and another square field are equal. Find the area in sq.m of the circular field if the area of the square field is 484 sq.m.<br
/> (a) 888 (b) 770 (c) 616 (d) None of these<br
/> Ans (c)</p><p>29. If the compound interest on a certain sum for 2 yrs at 10% annum is Rs. 2100, the simple interest on it at the same rate for 2 yrs will be.<br
/> (a) Rs. 1700 (b) Rs. 1800 (c) Rs. 1900 (d) Rs. 2000<br
/> Ans (d)</p><p>30. The diagonal of a square A is x + y. The diagonal of a square ‘B’ with twice the area of A is<br
/> (a) 2(x + y) (b) x + 2y (c) ?2 (x + y) (d) 2x + 4y<br
/> Ans (c)</p><p>31. If 10x+3y : 5n+2y = 9:5, then x : y is<br
/> (a) 3:5 (b) 5:3 (c) 2:5 (d) 1:2<br
/> Ans (a)</p><p>32. A conical tent of radius 12m and height 16m is to be made. Find its cost if canvas is Rs. 10 per m2<br
/> (a) Rs 7543 (b) Rs 7445 (c) Rs 7342 (d) 7600<br
/> Ans (a)</p><p>33. 1, 5, 14, 30, ?, 91<br
/> (a) 45 (b) 55 (c) 46 (d) 60<br
/> Ans (b)</p><p>34. 1, 2, 4, 6, 7, 10, 10, ?, 13<br
/> (a) 7 (b) 11 (c) 14 (d) 12<br
/> Ans (c)</p><p>35. 2, 6, 30, 60, 130, ?<br
/> (a) 210 (b) 216 (c) 200 (d) 160<br
/> Ans (a)</p> ]]></content:encoded> <wfw:commentRss>http://www.freequestionbank.com/question/sbi-bank-clerk-numerical-ability/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>SBI BANK CLERK REASONING</title><link>http://www.freequestionbank.com/question/sbi-bank-clerk-reasoning/</link> <comments>http://www.freequestionbank.com/question/sbi-bank-clerk-reasoning/#comments</comments> <pubDate>Sat, 28 Mar 2009 07:57:55 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Exam]]></category> <category><![CDATA[Question]]></category> <category><![CDATA[banking]]></category> <category><![CDATA[paper]]></category> <category><![CDATA[sbi]]></category><guid
isPermaLink="false">http://www.freequestionbank.com/?p=484</guid> <description><![CDATA[1.Study each of the following table and choose the alternative which can best replace the question mark (?)
1 2 3 ...]]></description> <content:encoded><![CDATA[<p>1.Study each of the following table and choose the alternative which can best replace the question mark (?)<br
/> 1 2 3 2 10 12<br
/> 2 5 12 10 16 13<br
/> 1 2 1 ? 10 24<br
/> (a) 5 (b) 11 (c) 13 (d) 8<br
/> Ans (c)</p><p>2. Study each of the following table and choose the alternative which can best replace the question mark (?)<br
/> 3 8 10 2 ? 1<br
/> 6 56 90 2 20 0<br
/> (a) 0 (b) 3 (c) 5 (d) 7<br
/> Ans (c)</p><p>3.In the following question one term in the number series is wrong. Find out the wrong term.<br
/> 11, 5, 20, 12, 40, 26, 74, 54<br
/> (a) 5 (b) 20 (c) 40 (d) 26<br
/> Ans (c)</p><p>4. In the following question one term in the number series is wrong. Find out the wrong term.<br
/> 8, 14, 26, 48, 98, 194, 386<br
/> (a) 14 (b) 48 (c) 98 (d) 194<br
/> Ans (b)</p><p>5. Calculate value of each word by the following formula:<br
/> Consonants = (2 ? Position of the letter in alphabet) &#8211; 1<br
/> Vowels = (3 ? Position in alphabet) + 1<br
/> CHANGE<br
/> (a) 77 (b) 79 (c) 83 (d) 80<br
/> Ans (d)</p><p>6. Calculate value of each word by the following formula:<br
/> Consonants = (2 ? Position of the letter in alphabet) &#8211; 1<br
/> Vowels = (3 ? Position in alphabet) + 1<br
/> FLUTE<br
/> (a) 153 (b) 157 (c) 151 (d) 149<br
/> Ans (a)</p><p>7. Calculate value of each word by the following formula:<br
/> Consonants = (2 ? Position of the letter in alphabet) &#8211; 1<br
/> Vowels = (3 ? Position in alphabet) + 1<br
/> BREAD<br
/> (a) 67 (b) 62 (c) 59 (d) 65<br
/> Ans (d)</p><p>8. In a certain code language, ?3a, 2b, 7c? means ?Truth is Eternal?; ?7c, 9a, 8b, 3a? means ?Enmity is not Eternal? and 6a, 4d, 2b, 8b? means ?Truth does not perish?. Which of the following means ?enmity? in that language?<br
/> (a) 3a (b) 7c (c) 8b (d) 9a<br
/> Ans (d)</p><p>9. In a certain code language, ?po ki top ma? means ?Usha is playing cards?; ?Kop ja ki ma? means ?Asha is playing tennis?; ki top sop ho? means ?they are playing football?; and ?po sur kop? means ?cards and tennis?. Which word in that language means ?Asha??<br
/> (a) ja (b) ma (c) kop (d) top<br
/> Ans (a)</p><p>10. A girl was born on September 6, 1970, which happened to be a Sunday. Her birthday has again fall on Sunday in<br
/> (a) 1975 (b) 1976 (c) 1977 (d) 1981<br
/> Ans (d)</p><p>11. A long rope has to be cut to make 23 small pieces. If it is double folded to start with how many times does it need to be cut?<br
/> (a) 9 (b) 23 (c) 11 (d) 12<br
/> Ans (c)</p><p>12. There are 19 hockey players in a club. On a particular day 14 were wearing the hockey shirts prescribed, while 11 were wearing the prescribed hockey pants. None of them was without either hockey pants or hockey shirts. How many were in complete hockey uniform?<br
/> (a) 8 (b) 6 (c) 9 (d) 7<br
/> Ans (b)</p><p>13. In a class room three fourth of the boys are above 160 cm in height and they are 18 in number. Also out of the total strength, the boys form only two third and the rest are girls. The total number of girls in the class is<br
/> (a) 18 (b) 24 (c) 12 (d) 30<br
/> Ans (c)</p><p>14. ?A? is east of ?B? and west of ?C?. ?H? is South-West of ?C?, ?B? is South-East of ?X?. which is farthest West?<br
/> (a) C (b) A (c) X (d) B<br
/> Ans (c)</p><p>15. A girl earns twice as much in December as in each of the other months. What part of her entire year?s earning does she earn in December?<br
/> (a) 2/11 (b) 2/13 (c) 3/14 (d) 1/6<br
/> Ans (b)</p><p>16. One watch is 1 minute slow at 1 pm on Tuesday and 2 minutes fast at 1 pm on Thursday. When did it show the correct time?<br
/> (a) 1.00 am on Wednesday (b) 5.00 am on Wednesday (c) 1.00 pm on Wednesday (d) 5.00 pm on Wednesday<br
/> Directions (Question 17 to 22) :Given a statement followed by two assumptions numbered I and II. You have to consider the statement and the following assumptions and decide which of the assumptions is implicit in the statement.<br
/> Mark (a) if only assumption I is implicit<br
/> Mark (b) if only assumption II is implicit<br
/> Mark (c) if either I or II is implicit<br
/> Mark (d) if neither I or II is implicit</p><p>17.Statement: Even with the increase in the number of sugar factories in India. We still continue to import sugar.<br
/> Assumptions :I. The consumption of sugar per capita has increased in India.<br
/> II. Many of the factories are not in a position to produce sugar to their fullest capacity.<br
/> Ans (c)</p><p>18.Statement :I cannot contact you on phone from Karshik.<br
/> Assumption : I. Telephone facility is not available at Karshik.<br
/> II. Nowadays it is difficult to contact on phone.<br
/> Ans (b)</p><p>19.Statement : The government has decided to reduce the custom duty on computer peripherals.<br
/> Assumptions : I. The domestic market price of computer peripherals may go up in near future.<br
/> II. the domestic manufacturers may oppose the decision.<br
/> Ans (a)</p><p>20. Statement : In Bombay, railway trains are indispensable for people in the suburbs to reach their places of work on time.<br
/> Assumptions : I. Railway trains are the only mode of transport available in the suburbs of Bombay.<br
/> II. Only railway trains run punctually.<br
/> Ans (a)</p><p>21. Statement :The private bus services in the city has virtually collapsed because of the ongoing strike of its employees.<br
/> Assumptions : I. Going on strikes has become the right of every employee.<br
/> II. People no more require the services of private bus operators.<br
/> Ans (b)</p><p>22. Statement : Detergents should be used. to clean clothes.<br
/> Assumptions : I. Detergents from more lather.<br
/> II. Detergents help to dislodge grease and dirt.<br
/> Ans (d)</p><p>23. Which letter when placed at the sign of interrogation shall complete the matrix?<br
/> A D H<br
/> F I M<br
/> ? N R<br
/> (a) P (b) N (c) K (c) O<br
/> Ans (c)</p><p>24. Which letter when placed at the sign of interrogation shall complete the matrix?<br
/> A M B N<br
/> R C S D<br
/> E U F ?<br
/> (a) T (b) F (c) V (d) R<br
/> Ans (c)</p><p>25. Which number when placed at the sign of interrogation shall complete the matrix?<br
/> 1 4 9 ?<br
/> 1 2 3 4<br
/> 2 4 6 ?<br
/> (a) 16 and 8 (b) 36 and 4 (c) 25 and 5 (d) 49 and 7<br
/> Ans (a)</p><p>26. Which number when placed at the sign of interrogation shall complete the matrix?<br
/> 6 6 8<br
/> 5 7 5<br
/> 4 3 ?<br
/> 120 126 320<br
/> (a) 12 (b) 16 (c) 8 (d) 4<br
/> Ans (c)</p><p>27. In the following questions, there are given two statements followed by two conclusions numbered I and II. You have to take the two given statements to be true even if they seem to be at variance from commonly known facts and then decide which of the given conclusions logically follows from two given statements, disregarding commonly known facts. Read both the statements and give answer as:<br
/> (a) If only conclusion I follows. (b) If only conclusion II follows.<br
/> (c) If either I or II follows. (d) If neither I nor II follows.<br
/> Statements: I. Many scooters are trucks. II. All trucks are trains<br
/> Conclusions: I. Some scooters are trains. II. No truck is a scooter.<br
/> Ans (a)</p><p>28. In the following questions, there are given two statements followed by two conclusions numbered I and II. You have to take the two given statements to be true even if they seem to be at variance from commonly known facts and then decide which of the given conclusions logically follows from two given statements, disregarding commonly known facts. Read both the statements and give answer as:<br
/> (a) If only conclusion I follows. (b) If only conclusion II follows.<br
/> (c) If either I or II follows. (d) If neither I nor II follows.<br
/> Statements: I. All cars are cats. II. All fans are cats.<br
/> Conclusions: I. All cars are fans. II. Some fans are cars.<br
/> Ans (d)</p><p>29. In the following questions, there are given two statements followed by two conclusions numbered I and II. You have to take the two given statements to be true even if they seem to be at variance from commonly known facts and then decide which of the given conclusions logically follows from two given statements, disregarding commonly known facts. Read both the statements and give answer as:<br
/> (a) If only conclusion I follows. (b) If only conclusion II follows.<br
/> (c) If either I or II follows. (d) If neither I nor II follows.<br
/> Statements: I. All pilots are experts. II. All authors are pilots.<br
/> Conclusions: I. All authors are experts. II. No expert in an author.<br
/> Ans (a)</p><p>30.In the following questions, there are given two statements followed by two conclusions numbered I and II. You have to take the two given statements to be true even if they seem to be at variance from commonly known facts and then decide which of the given conclusions logically follows from two given statements, disregarding commonly known facts. Read both the statements and give answer as:<br
/> (a) If only conclusion I follows. (b) If only conclusion II follows.<br
/> (c) If either I or II follows. (d) If neither I nor II follows.<br
/> Statements: I. Some doctors are institutes. II. Some crooks are institutes.<br
/> Conclusions: I. All institutes are doctors. II. Some institutes are crooks.<br
/> Ans (b)</p> ]]></content:encoded> <wfw:commentRss>http://www.freequestionbank.com/question/sbi-bank-clerk-reasoning/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Probationary Officer : General English</title><link>http://www.freequestionbank.com/question/probationary-officer-general-english/</link> <comments>http://www.freequestionbank.com/question/probationary-officer-general-english/#comments</comments> <pubDate>Sat, 28 Mar 2009 07:56:37 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Exam]]></category> <category><![CDATA[Question]]></category> <category><![CDATA[banking]]></category> <category><![CDATA[paper]]></category> <category><![CDATA[Probationary]]></category><guid
isPermaLink="false">http://www.freequestionbank.com/?p=482</guid> <description><![CDATA[
Probationary Officer : General English
Direction (Questions 1 to 5): Pick out word with the Opposite meaning.
1. Though his view is ...]]></description> <content:encoded><![CDATA[<p><span><br
/> <a
title="Permanent Link: Probationary Officer : General English Part 1" rel="bookmark" href="http://solvedquestionpapers.com/probationary-officer-general-english-part-1/42"><strong>Probationary Officer : General English</strong></a></span></p><p><span><span><span
style="font-size: small;">Direction (Questions 1 to 5): Pick out word with the Opposite meaning.<br
/> 1. Though his view is correct his behavior was</span> <strong><span>impertinent</span></strong><br
/> <span
style="font-size: small;">(a) healthy<br
/> (b) respectful<br
/> (c) inadequate<br
/> (d) smooth<br
/> (e) impressive<br
/> Ans (b)</span></span></p><p>2. The commission took two years to sift through the <strong><span>massive</span></strong> collection of documents.<br
/> (a) meager<br
/> (b) heavy<br
/> (c) light<br
/> (d) short<br
/> (e) ugly<br
/> Ans (c)</p><p>3. The Minister’s speech <strong><span>precipitated</span></strong> the matter.<br
/> (a) aggravate<br
/> (b) create<br
/> (c) defer<br
/> (d) push<br
/> (e) pull<br
/> Ans (c)</p><p>4. The chairman <strong><span>rebuked</span></strong> the accounts officer.<br
/> (a) received<br
/> (b) awarded<br
/> (c) invited<br
/> (d) strengthened<br
/> (e) praised<br
/> Ans (b)</p><p>5. The manager is quite <strong><span>tactful</span></strong> and handles the workers union very effectively.<br
/> (a) disciplined<br
/> (b) naive<br
/> (c) strict<br
/> (d) loose<br
/> (e) relaxed<br
/> Ans (b)</p><p> </p><p><span><span
style="font-size: small;">Direction (Questions 6 to 10): Pick out the word synonymous with the one in the sentence given below.<br
/> 6. After the</span> <strong><span>dismal </span></strong><span
style="font-size: small;">show the caption resigned his job.<br
/> (a) poor<br
/> (b) sorrowful<br
/> (c) minimum<br
/> (d) short<br
/> (e) miser<br
/> Ans (a)</span></span></p><p>7. The boy gave a <strong><span>graphic</span></strong> account of the theft.<br
/> (a) picture<br
/> (b) drawing<br
/> (c) vivid<br
/> (d) broad<br
/> (e) vague<br
/> Ans (c)</p><p>8. The soldier displayed <strong><span>exceptional</span></strong> courage and saved the members of his platoon.<br
/> (a) avoidable<br
/> (b) unusual<br
/> (c) strange<br
/> (d) abnormal<br
/> (e) new<br
/> Ans (b)</p><p>9. The police officer found that the documents recovered were <strong><span>fabricated.</span></strong><br
/> (a) prepared<br
/> (b) forged<br
/> (c) genuine<br
/> (d) historical<br
/> (e) constricted<br
/> Ans (b)</p><p>10. In spite of their efforts, they could not make much <strong><span>headway.</span></strong><br
/> (a) progress<br
/> (b) thinking<br
/> (c) efforts<br
/> (d) starts<br
/> (e) results<br
/> Ans (a)</p><p> </p><p><span><span
style="font-size: small;">Fill up to blanks in the following Questions from 11 to 18 picking out from the choices.<br
/> 11. Mahesh _____ me coming to his table, he smiled and ___ me a chair<br
/> (a) looked, gave<br
/> (b) welcomed, took<br
/> (c) saw, offered<br
/> (d) found, signaled<br
/> (e) met, sat<br
/> Ans (c)</span></span></p><p>12. The counter Clerk was very busy and ____ not pay any ___ to Sohan’s request.<br
/> (a) did, attention<br
/> (b) had, cash<br
/> (c) could, respect<br
/> (d) can, help<br
/> (e) Certainly, acceptance<br
/> Ans (a)</p><p>13. We are ___ to have him ____ here to make this function a great success<br
/> (a) happy, arrive<br
/> (b) wonderful, again<br
/> (c) sure, come<br
/> (d) pleased, over<br
/> (e) proud, leave<br
/> Ans (d)</p><p>14. Satyam ___ another feather ___ his cap by his performance in one day match.<br
/> (a) created, by<br
/> (b) took, in<br
/> (c) captured, from<br
/> (d) kept, in<br
/> (e) added, to<br
/> Ans (e)</p><p>15. The state Govt. staff ___ threatened to launch an indefinite strike from next month to ___ their demands.<br
/> (a) have, press<br
/> (b) did, get<br
/> (c) were, meet<br
/> (d) nearly, fulfill<br
/> (e) has, press<br
/> Ans (a)</p><p>16. The speech ___ with subtle threats has resulted in ___ tension.<br
/> (a) full, escalating<br
/> (b) started, reduced<br
/> (c) followed, continuous<br
/> (d) replete, increased<br
/> (e) forced, dissolving<br
/> Ans (d)</p><p>17. By long queues and bad weather the voters__ their way to the polling stations ___ a lot.<br
/> (a) undaunted, made<br
/> (b) making, suffered<br
/> (c) encouraged, prepared<br
/> (d) going, dropped<br
/> (e) satisfied, turned<br
/> Ans (b)</p><p>18. The CM ____ the house that ____ action would be taken against all those involved in corruption.<br
/> (a) instructed, preventive<br
/> (b) called, stick<br
/> (c) assured, stringent<br
/> (d) reiterated, strictly<br
/> (e) informed, constructive<br
/> Ans (c)</p><p> </p><p><span><span
style="font-size: small;">Direction (Questions 19 to 25):In each of the following questions , a part of sentence is given with underline. Below each sentence, four choices numbered (a), (b), (c), (d) are given which can substitute the part of the sentence printed with underline. Find out the choice which can correctly substitute that part of the sentence. The number of that choice is the answer. If ‘No correction needed’ is your answer, the choice is (e).<br
/> 19. He has received no other message than an urgent telegram</span> <strong><span>asking him to rush village</span></strong> <span
style="font-size: small;">soon.<br
/> (a) asked him to rush his village<br
/> (b) asking him to have to his village<br
/> (c) asking him to rush to his village<br
/> (d) asking him rushing at his village<br
/> (e) No correction required<br
/> Ans (a)</span></span></p><p>20. We must <strong><span>take it granted</span></strong> that Anju will not come for today’s function.<br
/> (a) take it for granted<br
/> (b) taking it granted<br
/> (c) took it as granted<br
/> (d) have it granted<br
/> (e) Non correction required<br
/> Ans (a)</p><p>21.<strong><span> I earnestly believes</span></strong> that you will visit our relatives during your trip to Mumbai.<br
/> (a) had hardly believe that<br
/> (b) sincerely believe<br
/> (c) certainly believing that<br
/> (d) could not believe<br
/> (e) No correction required<br
/> Ans (b)</p><p>22. The train will leave at 8.30 pm, <strong><span>we have been ready</span></strong> by 7.30 pm so that we can reach the station in time<br
/> (a) were<br
/> (b) must be<br
/> (c) are<br
/> (d) should have<br
/> (e) No correction required<br
/> Ans (b)</p><p>23. Binita unnecessarily <strong><span>picked up a quarrel</span></strong> with Sanjay and left the party.<br
/> (a) has picked up<br
/> (b) picked on<br
/> (c) picked<br
/> (d) picking up<br
/> (e) No correction required<br
/> Ans (e)</p><p>24. Raja has the guts to <strong><span>rise from</span></strong> the occasion and come out successfully.<br
/> (a) in rising from<br
/> (b) to raise with<br
/> (c) to rise against<br
/> (d) to rise to<br
/> (e) No correction required<br
/> Ans (d)</p><p>25. I need not offer any explanation, my behaviour <strong><span>is speaking itself</span></strong>.<br
/> (a) will speak to itself<br
/> (b) speaks for itself<br
/> (c) has been speaking<br
/> (d) speaks about itself<br
/> (e) No correction required<br
/> Ans (b)</p><p></span></p> ]]></content:encoded> <wfw:commentRss>http://www.freequestionbank.com/question/probationary-officer-general-english/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>GATE:THEORY OF COMPUTATION</title><link>http://www.freequestionbank.com/question/gatetheory-of-computation/</link> <comments>http://www.freequestionbank.com/question/gatetheory-of-computation/#comments</comments> <pubDate>Sat, 28 Mar 2009 07:50:12 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Exam]]></category> <category><![CDATA[GATE]]></category> <category><![CDATA[Question]]></category> <category><![CDATA[Interview]]></category> <category><![CDATA[math]]></category> <category><![CDATA[paper]]></category><guid
isPermaLink="false">http://www.freequestionbank.com/?p=478</guid> <description><![CDATA[
THEORY OF COMPUTATIONQ1. Choose the correct statement. The set of all strings over an alphabet S ={0,1} with the concatenation operator ...]]></description> <content:encoded><![CDATA[<div></div><div>THEORY OF COMPUTATION</div><div></div><div>Q1. Choose the correct statement. </div><div></div><div>The set of all strings over an alphabet S ={0,1} with the concatenation operator for strings</div><div></div><div>a) does not form a group</div><div></div><div>b) forms a noncommutative group</div><div></div><div>c) does not have a right identity</div><div></div><div>d) forms a group if the empty string is removed from S *</div><div></div><div>Q2. Consider the set of all strings S * over an alphabet S ={a,b} with the concatenation operator for strings, and </div><div>a) the set does forms semigroup</div><div></div><div>b) the set does not form a group</div><div></div><div>c) the set has a left and right identity</div><div></div><div>d) the set forms a monoid</div><div></div><div></div><div>Q3. Consider the set of all strings S * over the alphabet S ={a,b,c,d,e} with the concatenation operator for strings. </div><div>a. the set has a right identity and forms a semigroup</div><div></div><div>b. the set has a left identity and forms a monoid</div><div></div><div>c. the set does not form a commutative group but has an identity</div><div></div><div>d. the set does not form a semigroup with identity</div><div></div><div></div><div></div><div>Q4. Nobody knows yet if P = NP. Consider the language L defined as follows:</div><div></div><div>L=()+1)* if P = NP</div><div></div><div>And</div><div></div><div>L=j otherwise</div><div></div><div>Which of the following statements is true?</div><div></div><div>a) L is recursive</div><div></div><div>b) L is recursively enumerable but not recursive</div><div></div><div>c) L is not recursively enumerable</div><div></div><div>d) Whether L is recursive or not will be known after we find out if P = NP</div><div></div><div></div><div></div><div>Q5. Consider the language defined as follows</div><div></div><div>L= {a^n b^n|n&gt;=1} if P=NP</div><div></div><div>And</div><div></div><div>L={ww|w in (a+b)+} otherwise</div><div></div><div>Which of the following statements is true?</div><div></div><div>a) L is recursive but not context sensitive</div><div></div><div>b) L is context sensitive but not context free</div><div></div><div>c) L is context sensitive</div><div></div><div>d) What L is will be known after we resolve the P=NP question</div><div></div><div></div><div>Q6. Consider the language defined as follows</div><div></div><div>L=(0+1)* if the CSLs are closed under complement</div><div></div><div>And</div><div></div><div>L=(0*1)*0* if P=NP</div><div></div><div>And</div><div></div><div>L=(10*)1* if P is not the same as NP</div><div></div><div>Which of the following statements is true?</div><div></div><div>a) L is always a regular set</div><div></div><div>b) L does not exist</div><div></div><div>c) L is recursive but not a regular set</div><div></div><div>d) What L is will be known after the two open problems P = NP and the closure of CSLs under complement are resolved</div><div></div><div></div><div>Q7. Consider the language defined as follows</div><div></div><div>L=(0+1)* if man goes to Mars by 2020AD</div><div></div><div>And</div><div></div><div>L=0* if man never goes to the Mars</div><div></div><div>Which of the following is true?</div><div></div><div>a. L is context free language but not recursive</div><div></div><div>b. L is recursive</div><div></div><div>c. Whether L is recursive or not will be known in 2020AD</div><div></div><div>d. L is a r.e. set that is not regular</div><div></div><div>Q8. Given an arbitrary context free grammar G, we define L as below.</div><div></div><div>L=(0+1)* if G is ambiguous</div><div></div><div>And</div><div></div><div>L=j if G is not ambiguous</div><div></div><div></div><div>a. L is a context-free language</div><div></div><div>b. L is recursive but not r.e.</div><div></div><div>c. What L is depends on whether we can determine if G is ambiguous or not</div><div></div><div>d. What L is is undecidable</div><div></div><div></div><div>Q9. Given an arbitrary turing machine M and a string w we define L as below.</div><div></div><div>L=(0*1)*0* if M halts on w</div><div></div><div>And</div><div></div><div>L=(0*1*)* if M does not halt on w</div><div></div><div></div><div>a. The type of L is undecidable because of the halting problem</div><div></div><div>b. L is a context-sensitive language</div><div></div><div>c. L is recursively enumerable and not context-free</div><div></div><div>d. L is context sensitive and not regular</div><div></div><div></div><div>Q10. Consider the language L defined below</div><div></div><div>L=(0+1)* if P=NP</div><div></div><div>And</div><div></div><div>L=(a^nb^n|n&gt;=1} otherwise</div><div></div><div></div><div>a. Whether L is a regular set that is not context-free will be known after we resolve the P=NP question.</div><div></div><div>b. Whether L is context-free but not regular will be known after we resolve the P=NP question</div><div></div><div>c. L is context-sensitive</div><div></div><div>d. L is not recursive</div><div></div><div></div><div>Q11. It is undecidable if two cfls L1 and L2 are equivalent. Consider two cfls L1 and L2 and a language defined as follows</div><div></div><div>L={a^nb^nc^n|n&gt;=234} if L1=L2</div><div></div><div>And</div><div></div><div>L={a^nb^nc^nd^n|n&gt;=678} otherwise</div><div></div><div></div><div>a. L is recursive</div><div></div><div>b. L is context-free</div><div></div><div>c. We can never say anything about L as it is undecidable</div><div></div><div>d. L is regular</div><div></div><div>Q12. At present it is not known if NP is closed under complementation.</div><div></div><div>Consider L defined as below</div><div></div><div>L={w wR w| w in (0+1+2)* and wR is the reverse of w} if NP is closed under complement</div><div></div><div>And</div><div></div><div>L = {a^nb^nc^nd^ne^n|n&gt;=34567} otherwise</div><div></div><div></div><div>a) L is recursive</div><div></div><div>b) L is context-free and not context-sensitive</div><div></div><div>c) L is recursively enumerable but not recursive</div><div></div><div>d) We will be able to say something about L only after we resolve the NP complementation issue</div><div></div><div>Q14. Nobody knows if P=NP at present. Consider a language L as defined below</div><div></div><div>L=(0+1)* if satisfiability is in P</div><div></div><div>L=(0*1)0* if satisfiability is not in P</div><div></div><div>L=(1*0)1* if 3-sat is in P</div><div></div><div>L=(0*1*)* if 3-sat is not in P</div><div></div><div>L=(0*1*0*1*)* if 0/1 knapsack problem is in P</div><div></div><div>L=(1*0*1*0*)* if 0/1 knapsack problem is not in P</div><div></div><div>L=(0*(00)*(1*11*)*) * if max-clique problem is in P</div><div></div><div>L=(0*(00)*(1*11*)*) * if node-cover problem is not in P</div><div></div><div>L=(0*1*)****(010)* if edge-cover problem is not in P</div><div></div><div>L=(0* + 1* + (00)* + (11)*)*(0100101010)* if the chromatic problem is not in P</div><div></div><div>What can we say about the string 0000111100001111=x</div><div></div><div>a) x is always in L</div><div></div><div>b) whether x is in L or not will be known after we resolve P=NP</div><div></div><div>c) the definition of L is contradictory</div><div></div><div>d) x can never be in L</div><div></div><div>Q15. An arbitrary turing machine M will be given to you and we define a language L as follows</div><div></div><div>L=(0+00)* if M accepts at least one string</div><div></div><div>L=(0+00+000)* if M accepts at least two strings</div><div></div><div>L=(0+00+000+0000)* if M accepts at least three strings</div><div></div><div>&#8212;&#8212;&#8212;</div><div></div><div>&#8212;&#8212;&#8212;</div><div></div><div>L=(0+00+000+&#8212;+0^n) *if M accepts at least n-1 strings</div><div></div><div>Choose the correct statement.</div><div></div><div>a) We cannot say anything about L as the question of whether a turing machine accepts a string is undecidable</div><div></div><div>b) L is context-sensitive but not regular</div><div></div><div>c) L is context-free but not regular</div><div></div><div>d) L is not a finite set</div><div></div><div>Q16. We are given two context-free languages L1 and L2 and L defined as below</div><div></div><div>a) L=(0+1)* if L1=L2</div><div></div><div>b) L=((0+00+000)*(1+11+111)*)* if L1 is contained in L2</div><div></div><div>c) L=((0(10)*)*(1(01)*)* if L2 is contained in L1</div><div></div><div>d) L=(00+11+0+1)*(0+00+000)* if L1 and L2 are incomparable</div><div></div><div></div><div>a) As all the conditions relating to L1 and L2 are undecidable we cannot say anything about L</div><div></div><div>b) L is recursively enumerable</div><div></div><div>c) L is recursive but not context-sensitive</div><div></div><div>d) L is context-sensitive but not context-free</div><div></div><div>e) L is context-free but not regular</div><div></div><div>Q17. It is undecidable if an arbitrary cfl is inherently ambiguous. We are given a cfg G and the language L is defined as below</div><div></div><div>L= (0+1)*01(0+1)* U 1*0* if L(G) is inherently ambiguous</div><div></div><div>L=(0+1)*10(0+1)* U 0*1* if L(G) is not inherently ambiguous</div><div></div><div>Choose the incorrect statement</div><div></div><div>a) L is regular</div><div></div><div>b) L iscontext-free</div><div></div><div>c) L is context-sensitive</div><div></div><div>d) The above choices can be resolved only if we know if L(G) is inherently ambiguous or not</div><div></div><div>Q18. We are given an arbitrary turing machine M and define the language L as below</div><div></div><div>L=(0*+1*)* if M halts on blank tape</div><div></div><div>L=(0+1*)* if M ever prints a 1</div><div></div><div>L=(0*+1)* if M ever enters a designated state q</div><div></div><div>L=((0+1+00+11+000+111)+)* if M accepts an infinite set</div><div></div><div>L=0*(10*)* if M accepts a finite set</div><div></div><div>L=1*(01*)* if M accepts exactly 45 strings</div><div></div><div>Choose the correct statement with reference to the string x=00000111111000000111111</div><div></div><div>a) x is in L</div><div></div><div>b) x is not in L</div><div></div><div>c) we can never decide if x is in L as all the problems of the turing machine are undecidable</div><div></div><div>d) whether x is in L depends on the particular turing machine M</div><div></div><div>Q19. We are given a language L defined as follows</div><div></div><div>L=(0+1)* if the Hamiltonian circuit problem is in P</div><div></div><div>L=(0*1*+0)* if the Traveling salesman problem is not in P</div><div></div><div>L=(0*1*1)*0* if the bin packing problem is in P</div><div></div><div></div><div>a) the definition of L is contradictory</div><div></div><div>b) What L is will be known after we resolve the P=NP question</div><div></div><div>c) L if a finite set</div><div></div><div>d) The string 01010101001010110010101 is in L</div><div></div><div>Q20. The intersection of two cfls can simulate a turing machine computation. We are given two cfls L1 and L2 and define the language L as below</div><div></div><div>a) L=(00)* if the intersection of L1 and L2 is empty</div><div></div><div>b) L=((0(00)*)(0(00)*))* if L1 is regular</div><div></div><div>c) L=(00+0000+000000)* if L2 is not regular</div><div></div><div>d) L=(00)*+(0000)* if the complement of L1 is a cfl</div><div></div><div></div><div>a) L is a finite set</div><div></div><div>b) L is a regular set</div><div></div><div>c) L is undecidable</div><div></div><div>d) L is recursive but not context-free</div><div></div><div>Q21. The language {0^p|p not prime} is</div><div></div><div>A. regular</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive</div><div></div><div></div><div></div><div>Q22. 0^2^n|n&gt;=1} is</div><div>A D V E R T I S E M E N T</div><div></div><div>A. regular</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive</div><div></div><div></div><div></div><div>Q23. The language {a^i b^j c^j|j&gt;=i} is</div><div></div><div>A. regular</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive</div><div></div><div></div><div></div><div>Q24. The language {a^i b^i c^i|n&gt;=1} is</div><div></div><div>A. regular</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive</div><div></div><div></div><div></div><div>Q25. The language {a^i b^j c^k|i,j,k&gt;=1} is</div><div></div><div>A. regular</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive</div><div></div><div></div><div></div><div>Q26. The language {a^i b^j c^k | i&lt;&gt;j or j&lt;&gt;k or k&lt;&gt;i} is</div><div></div><div>A. regular</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive</div><div></div><div></div><div></div><div>Q27. The language {w| w in binary is a prime} is</div><div></div><div>A. regular</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive</div><div></div><div></div><div></div><div>Q28. {0^n 1^n|n&gt;=1} is</div><div></div><div>A. regular</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive</div><div></div><div></div><div></div><div>Q29. The languge {0^1 1^j|gcd(i,j)=1} is</div><div></div><div>A. regular</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive</div><div></div><div></div><div></div><div>Q30. {w| w has equal number of a&#8217;s and b&#8217;s } is</div><div></div><div>A. regular</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive</div><div></div><div></div><div></div><div>Q31.The language {ww| w a string over the alpahabet} is</div><div></div><div>A. regular</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive</div><div></div><div></div><div></div><div>Q32. The set of all palidromes over some alphabet is</div><div></div><div>A. regular</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive</div><div></div><div></div><div></div><div>Q33. The languge {a^i b^j c^k d^l| i=0 or j=k=l} is</div><div></div><div>A. regular</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive</div><div></div><div></div><div></div><div>Q34. The language {w| w in {0,1}* and w does not have three consecutive 0&#8217;s} is</div><div></div><div>A. regular</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive</div><div></div><div></div><div></div><div>Q35. The language {xwxR|x,w in (0+1)+} is</div><div></div><div>A. regular</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive</div><div></div><div></div><div></div><div>Q36. The language {xxRw|s,w in (0+1)+} is</div><div></div><div>A. regular</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive</div><div></div><div></div><div></div><div>Q37.The language {w| w is the set of all balanced parenthesis} is</div><div></div><div>A. regular</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive</div><div></div><div></div><div></div><div>Q38. The language {w| w is a well-formed regular expression over some alphabet} is</div><div></div><div>A. regular</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive</div><div></div><div></div><div></div><div>Q39. The language {w| strings not of the form xx, x in (0+1)*} is</div><div></div><div>A. regular</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive</div><div></div><div></div><div></div><div>Q40. The languge {w| w is not of the form a^n b^n c^n } is</div><div></div><div>A. regular</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive</div><div></div><div>Q41.The set {0,1,#}+-{b1#b2#&#8230;#bn|n&gt;=1} where bi is the binary representation of i is</div><div></div><div>A. regular</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive</div><div></div><div></div><div></div><div>Q42. The language {a^i b^j c^k d^l| i= j or j=k} is</div><div></div><div>A D V E R T I S E M E N T</div><div></div><div>A. regular</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive</div><div></div><div></div><div></div><div>Q43. The language (a+b)*-{(a^nb^n)^n|n&gt;=1} is</div><div></div><div>A. regular</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive</div><div></div><div></div><div></div><div>Q44. The language {wwRw| w in (a+b)+} is</div><div></div><div>A. regular</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive</div><div></div><div></div><div></div><div>Q45. The languge {bi#b(i+1)|bi is in binary } is</div><div></div><div>A. regular</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive</div><div></div><div></div><div></div><div>Q46. The languge {wxw| w, x in (c+d)*} is</div><div></div><div>A. regular</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive</div><div></div><div></div><div></div><div>Q47. The languge (a+b)*-{(a^nb^n)^n|n&gt;=1} is</div><div></div><div>A. regular</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive</div><div></div><div></div><div></div><div>Q48. The languge {a^n b^nc^i| i &lt;&gt; n} is</div><div></div><div>A. regular</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive</div><div></div><div></div><div></div><div>Q49. The language {a^n!|n&gt;=1} is</div><div></div><div>A. regular</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive</div><div></div><div></div><div></div><div>Q50. The languge {w| w has equal number of a&#8217;s,b&#8217;s, c&#8217;s or equal number a&#8217;s, b&#8217;s and d&#8217;s} is</div><div></div><div>A. regular</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive</div><div></div><div></div><div></div><div>Q51. The language {a^i b^j c^k| i=j or j=k} is</div><div></div><div>A. regular but not finite</div><div></div><div>B. deterministic context-free but not regular</div><div></div><div>C. context-sensitive but not regular</div><div></div><div>D.type-0 but not context-sensitive</div><div></div><div></div><div></div><div>Q52. The language {a^i b^j c^k|k=min(i,j)} is</div><div></div><div>A. regular but not finite</div><div></div><div>B. context-free but deterministic context free</div><div></div><div>C. context-sensitive but not deterministic context-free</div><div></div><div>D.recursive but not context-sensitive</div><div></div><div></div><div></div><div>Q53. The language {a^i b^j c^k| k= max(i,j)} os</div><div></div><div>A. regular but not context-free</div><div></div><div>B. context-free but not regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.recursive but not context-sensitive</div><div></div><div></div><div></div><div>Q54. The language {a^n b^n c^i| i&lt;&gt;n} is</div><div></div><div>A. regular but not finite</div><div></div><div>B. context-free but not regular</div><div></div><div>C. context-sensitive but not deterministic context-free</div><div></div><div>D.recursive but not context-sensitive</div><div></div><div></div><div></div><div>Q55. The language {a^i b^j c^k| i&lt;=k&lt;=2j} is</div><div></div><div>A. regular but not finite</div><div></div><div>B. context-free but not deterministic context-free</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.recursive but not context-sensitive</div><div></div><div></div><div></div><div>Q56. The language {a^i b^j c^k|i&lt;j&lt;k} is</div><div></div><div>A. regular but not finite</div><div></div><div>B. context-free but not regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.recursive or type-0 but not context-sensitive</div><div></div><div></div><div></div><div>Q57. The language {a^i b^j c^k|i+j&gt;=k} is</div><div></div><div>A. regular but not finite</div><div></div><div>B. context-free but not regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 or recursive but not context-sensitive</div><div></div><div></div><div></div><div>Q58. The langugae {a^i b^j c^k|k&lt;=i or k&lt;=j} is</div><div></div><div>A. regular but not finite</div><div></div><div>B. context-free but not regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 or recursive but not context-sensitive</div><div></div><div></div><div></div><div>Q59.{a^i b^i c^j d^j|i,j&gt;=1} is</div><div></div><div>A. regular but not finite</div><div></div><div>B. context-free but not regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 or recursive but not context-sensitive</div><div></div><div></div><div></div><div></div><div>Q60. The language {a^i b^i c^j d^2 e^3i|i,j&gt;=1} is</div><div></div><div>A. regular and finite</div><div></div><div>B. context-free but not regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.recursive but not context-sensitive</div><div></div><div></div><div>THEORY OF COMPUTATION</div><div></div><div>Q61. The language {w| w has equal number of a&#8217;s, b&#8217;s and c&#8217;s } is</div><div></div><div>A. regular but not finite</div><div></div><div>B. context-free but not regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 or recursive but not context-sensitive</div><div></div><div>A D V E R T I S E M E N T</div><div></div><div>Q62. The language {0^n1^n|n&gt;=1} U {0^n 1^2n|n&gt;=1} is</div><div></div><div>A. regular but not finite</div><div></div><div>B. context-free but not regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.recursive but not context-sensitive</div><div></div><div></div><div></div><div>Q63. The language {0^n1^n|n&gt;=1} U {0^n 1^2n|n&gt;=1} is</div><div></div><div>A. regular and finite</div><div></div><div>B. deterministic context-free but not regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 or recursive but not context-sensitive</div><div></div><div></div><div></div><div>Q64. The language {0^n1^n|n&gt;=1} U {0^n 1^2n|n&gt;=1} is</div><div></div><div>A. regular but not finite</div><div></div><div>B. context-free but not deterministic context free</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0or recursive but not context-sensitive</div><div></div><div></div><div></div><div>Q65. {0^i 1^ja2^i|j&gt;=i} U {0^i 1^jb2^i|j&gt;=i} is</div><div></div><div>A. regular and not finite</div><div></div><div>B. context-free but not deterministic context free</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but nor recursive</div><div></div><div></div><div></div><div></div><div></div><div>Q66. {0^i 1^ja2^i|j&gt;=i} U {0^i 1^jb2^i|j&gt;=i} is</div><div></div><div>A. regular and infinite</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive or recursive</div><div></div><div></div><div></div><div>Q 67. The language {a^n!|n&gt;=1} is</div><div></div><div>A. regular and finite</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive or recursive</div><div></div><div></div><div></div><div>Q68. The language {a^ceil(log2n)|n&gt;=1} is</div><div></div><div>A. regular and also deterministic context free</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive or recursive</div><div></div><div></div><div></div><div>Q69. {0^n 1^n^2|n&gt;=1} is</div><div></div><div>A. regular and not finite</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive or recursive</div><div></div><div></div><div></div><div>Q70. The langugae {a^p|p prime} is</div><div></div><div>A. regular and not finite</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive or deterministic context free</div><div></div><div></div><div></div><div>Q71. The language {0^p|p not prime} is</div><div></div><div>A. regular and finite</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 or recursive but not context-sensitive</div><div></div><div></div><div></div><div>Q72. 0^2^n|n&gt;=1} is</div><div></div><div>A. regular and not finite</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive or recursive</div><div></div><div></div><div></div><div>Q73. The language {a^i b^j c^j|j&gt;=i} is</div><div></div><div>A. regular and finite</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive or deterministic context-free</div><div></div><div></div><div></div><div>Q74. The language {a^i b^i c^i|n&gt;=1} is</div><div></div><div>A. regular and not deterministic context free</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive or recursive</div><div></div><div></div><div></div><div>Q75. The language {a^i b^j c^k|i,j,k&gt;=1} is</div><div></div><div>A. regular and infinite</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.recursive but not context-sensitive</div><div></div><div></div><div></div><div>Q76. The language {a^i b^j c^k | i&lt;&gt;j or j&lt;&gt;k or k&lt;&gt;i} is</div><div></div><div>A. regular and infinite</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive or recursive</div><div></div><div></div><div></div><div>Q77. The language {w| w in binary is a prime} is</div><div></div><div>A. regular and not finite</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 or recursive but not context-sensitive</div><div></div><div></div><div></div><div>Q78. {0^n 1^n|n&gt;=1} is</div><div></div><div>A. regular and not finite</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 or recursive but not context-sensitive</div><div></div><div></div><div></div><div>Q79. The languge {0^1 1^j|gcd(i,j)=1} is</div><div></div><div>A. regular and not infinite</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.recursive but not context-sensitive</div><div></div><div></div><div></div><div>Q80. {w| w has equal number of a&#8217;s and b&#8217;s } is</div><div></div><div>A. regular and infinite</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive or deterministic context-free</div><div></div><div>Q81.The language {ww| w a string over the alpahabet} is</div><div></div><div>A. regular and infinite</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive or recursive</div><div></div><div>A D V E R T I S E M E N T</div><div></div><div>Q82. The set of all palidromes over some alphabet is</div><div></div><div>A. regular and finite</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive or deterministic context free</div><div></div><div></div><div></div><div>Q83. The languge {a^i b^j c^k d^l| i=0 or j=k=l} is</div><div></div><div>A. regular and finite</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 or recursive but not context-sensitive</div><div></div><div></div><div></div><div>Q84. The language {w| w in {0,1}* and w does not have three consecutive 0&#8217;s} is</div><div></div><div>A. regular and infinite</div><div></div><div>B. context-free but not regular and not determinitstic context free</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive and not recursive</div><div></div><div></div><div></div><div>Q85. The language {xwxR|x,w in (0+1)+} is</div><div></div><div>A. regular and infinite</div><div></div><div>B. context-free but regular and not deterministic context-free</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive or recursive</div><div></div><div></div><div></div><div>Q86. The language {xxRw|s,w in (0+1)+} is</div><div></div><div>A. regular and infinite</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 or recursive but not context-sensitive</div><div></div><div></div><div></div><div>Q87.The language {w| w is the set of all balanced parenthesis} is</div><div></div><div>A. regular and finite</div><div></div><div>B. context-free but not regular and is infinite</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive or recursive</div><div></div><div></div><div></div><div>Q88. The language {w| w is a well-formed regular expression over some alphabet} is</div><div></div><div>A. regular and infinite</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.recursive but not context-sensitive</div><div></div><div></div><div></div><div>Q89. The language {w| strings not of the form xx, x in (0+1)*} is</div><div></div><div>A. regular and infinite</div><div></div><div>B. context-free but not regular or deterministic context-free</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 or recursive but not context-sensitive</div><div></div><div></div><div></div><div>Q90. The languge {w| w is not of the form a^n b^n c^n } is</div><div></div><div>A. regular and infinite</div><div></div><div>B. context-free but not regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 or recursive but not context-sensitive</div><div></div><div></div><div></div><div>Q91.The set {0,1,#}+-{b1#b2#&#8230;#bn|n&gt;=1} where bi is the binary representation of i is</div><div></div><div>A. regular and infinite</div><div></div><div>B. context-free but not regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 or recursive but not context-sensitive</div><div></div><div></div><div></div><div>Q92. The language {a^i b^j c^k d^l| i= j or j=k} is</div><div></div><div>A. regular and infinite</div><div></div><div>B. context-free but not regular or deterministic context free</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 or recursive but not context-sensitive</div><div></div><div></div><div></div><div>Q93. The language (a+b)*-{(a^nb^n)^n|n&gt;=1} is</div><div></div><div>A. regular and finite</div><div></div><div>B. context-free but not regular or deterministic context-free</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive or recursive</div><div></div><div></div><div></div><div>Q94. The language {wwRw| w in (a+b)+} is</div><div></div><div>A. regular and finite</div><div></div><div>B. context-free but not regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive or recursive</div><div></div><div></div><div></div><div>Q95. The languge {bi#b(i+1)|bi is in binary } is</div><div></div><div>A. regular and finite</div><div></div><div>B. context-free but not regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 or recursive but not context-sensitive</div><div></div><div></div><div></div><div>Q96. The languge {wxw| w, x in (c+d)*} is</div><div></div><div>A. regular and infinite</div><div></div><div>B. context-free but not regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 or recursive but not context-sensitive</div><div></div><div></div><div></div><div>Q97. The languge (a+b)*-{(a^nb^n)^n|n&gt;=1} is</div><div></div><div>A. regular and infinite</div><div></div><div>B. context-free but not regular or deterministic context-free</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 but not context-sensitive or recursive</div><div></div><div></div><div></div><div>Q98. The languge {a^n b^nc^i| i &lt;&gt; n} is</div><div></div><div>A. regular and finite</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 or recursive but not context-sensitive</div><div></div><div></div><div></div><div>Q99. The language {a^n!|n&gt;=1} is</div><div></div><div>A. regular and infinite</div><div></div><div>B. context-free but not regular</div><div></div><div>C. context-sensitive but not context-free or deterministic context-free</div><div></div><div>D.type-0 but not context-sensitive or recursive</div><div></div><div></div><div></div><div>Q100. The languge {w| w has equal number of a&#8217;s,b&#8217;s, c&#8217;s or equal number a&#8217;s, b&#8217;s and d&#8217;s} is</div><div></div><div>A. regular and infinite</div><div></div><div>B. context-free but regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D.type-0 or recursive but not context-sensitive</div><div></div><div></div><div>Q101. The language {a^mb^nc^(m+n)|m,n&gt;=1} is</div><div></div><div>A. regular</div><div></div><div>B.context-free but not regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D. type0 but not context sensitive</div><div></div><div></div><div></div><div>[GATE 2004]</div><div></div><div>Q102. The language {a0^n 1^n|n&gt;=1} U{b0^n 1^2n|n&gt;=1} is</div><div></div><div>A. regular</div><div>A D V E R T I S E M E N T</div><div></div><div>B.context-free but not regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D. type0 but not context sensitive</div><div></div><div></div><div></div><div>Q104. The language {a0^n 1^n|n&gt;=1} U{b0^n 1^2n|n&gt;=1} is</div><div></div><div>A. regular</div><div></div><div>B.deterministic context-free but not regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D. type0 but not context sensitive</div><div></div><div></div><div></div><div>Q105. The language {a0^n 1^n|n&gt;=1} U{b0^n 1^2n|n&gt;=1}U {c0^n 1^4n</div><div>|n&gt;1} is</div><div></div><div>A. regular</div><div></div><div>B.context-free but not regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D. type0 but not context sensitive</div><div></div><div></div><div></div><div>Q106. The language {a0^n 1^n|n&gt;=1} U{b0^n 1^2n|n&gt;=1}U {0^n1^89n|n&gt;=1} is</div><div></div><div>A. regular</div><div></div><div>B.deterministic context-free but not regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D. type0 but not context sensitive</div><div></div><div></div><div></div><div>Q107. The language {awwRbxxRcyyR|x,y,z in {0,1}*}is</div><div></div><div>A. regular</div><div></div><div>B.context-free but not regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D. type0 but not context sensitive</div><div></div><div></div><div></div><div>Q108. The language {awwRbxxRcyyRdwwR|x,y,w in (0+1)*}is</div><div></div><div>A. regular</div><div></div><div>B.deterministic context-free but not regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D. type0 but not context sensitive</div><div></div><div></div><div></div><div>Q109. A language denoted by a semi-extended regular expression which is regular expression with the additional operation of intersection of regular expressions is</div><div></div><div>A. regular</div><div></div><div>B.context-free but not regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D. type0 but not context sensitive</div><div></div><div></div><div></div><div>Q110. A language denoted by extended regular expressions which is regular expressions with the operations of intersection and complementation is </div><div></div><div>A. regular</div><div></div><div>B.deterministic context-free but not regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D. type0 but not context sensitive</div><div></div><div></div><div></div><div>Q111. The language {w#wR#|w in (0+1)+} U{wwR|w in ()+1+2)*} is</div><div></div><div>A. regular</div><div></div><div>B.context-free but not regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D. type0 but not context sensitive</div><div></div><div></div><div></div><div>Q112. The language {a0^n 1^n 2^n|n&gt;=1} U{b0^n 1^2n|n&gt;=1}U {0^n1^89n|n&gt;=1} is</div><div></div><div>A. regular</div><div></div><div>B.deterministic context-free but not regular</div><div></div><div>C. context-sensitive but not context-free</div><div></div><div>D. type0 but not context sensitive</div><div></div><div></div><div></div><div>Q113. Choose the false statement. The regular sets are closed under</div><div></div><div>A. intersection</div><div></div><div>B. union</div><div></div><div>C. complement</div><div></div><div>D. inverse substitution</div><div></div><div></div><div></div><div>Q114. Choose the false statement. The regular sets are closed under</div><div></div><div>A. MAX</div><div></div><div>B. MIN</div><div></div><div>C. INIT</div><div></div><div>D. inverse substitution</div><div></div><div></div><div></div><div>Q115. Choose the false statement. The regular sets are closed under</div><div></div><div>A. CYCLE</div><div></div><div>B. INTERLEAVING</div><div></div><div>C. REVERSAL</div><div></div><div>D. inverse substitution</div><div></div><div></div><div></div><div>Q116. Choose the false statement. The regular sets are closed under</div><div></div><div>A. intersection</div><div></div><div>B. SUBSTITUTION</div><div></div><div>C. complement</div><div></div><div>D. inverse substitution</div><div></div><div></div><div></div><div>Q117. Choose the false statement. The regular sets are closed under</div><div></div><div>A. quotient with a regular set</div><div></div><div>B. quotient with a context free language</div><div></div><div>C. quotient with a context-free language</div><div></div><div>D. inverse substitution</div><div></div><div></div><div></div><div></div><div></div><div>Q118. Choose the false statement. The regular sets are closed under</div><div></div><div>A. quotient with a recusive set</div><div></div><div>B. quotient with a r.e. language</div><div></div><div>C. quotient with any formal language</div><div></div><div>D. inverse substitution</div><div></div><div></div><div></div><div>Q119. Choose the false statement. The regular sets are closed under</div><div></div><div>A. Kleene closure</div><div></div><div>B. quotient with a context free language</div><div></div><div>C. quotient with a context-free language</div><div></div><div>D. inverse substitution</div><div></div><div></div><div></div><div>Q120. Choose the false statement. Let L be any formal language</div><div></div><div>A. L* is regular</div><div></div><div>B. L* is not necessaily regular</div><div></div><div>C. L* is context-free and not regular</div><div></div><div>D. L* is r.e. and not recursive</div><div></div><div></div><div>Q121. Choose the false statement. The regular sets are closed under</div><div></div><div>A. homomorphism</div><div></div><div>B. quotient with a deterministic context free language</div><div></div><div>C. inverse homomorphism</div><div></div><div>D. inverse substitution</div><div></div><div>A D V E R T I S E M E N T</div><div></div><div>Q122. Let L be a formal lanaugae. The set Lhalf is obtained by taking the first halves of strings in L. Choose the true statement</div><div></div><div>A. If L is regular then Lhalf is regular</div><div></div><div>B. If L is regular then Lhalf is not regular</div><div></div><div>C. If L is a cfl then Lhalf is a cfl</div><div></div><div>D. If L is a csl then Lhalf is a cfl</div><div></div><div></div><div></div><div>Q123. The cfls are not closed under</div><div></div><div>A. substitution, homomorphism, union</div><div></div><div>B. union, conctenation, Kleene closure</div><div></div><div>C.homomorphism, inverse homomorphism, intersection with a regular set</div><div></div><div>D. inverse substitution</div><div></div><div></div><div></div><div>Q124. The cfls are not closed under</div><div></div><div>A. MIN,MAX</div><div></div><div>B. union,Kleene closure, INIT</div><div></div><div>C. CYCLE</div><div></div><div>D. reversal</div><div></div><div></div><div></div><div>Q125. The cfls are not closed under</div><div></div><div>A. half&#8211;the language formed by taking the first halves of strings of a cfl</div><div></div><div>B. gsm mappings</div><div></div><div>C. Kleene closure, intersection with a regular set</div><div></div><div>D. complement</div><div></div><div></div><div></div><div>Q126. The complements of the cfls {a^nb^nc^n|n&gt;=1} and {ww|w in (0+1)+}are</div><div></div><div>A. Regular, Regular</div><div></div><div>B. both cfls</div><div></div><div>C. both csls but not cfls</div><div></div><div>D. CFL and regular</div><div></div><div></div><div></div><div>Q127. The cls are not closed under</div><div></div><div>A. union</div><div></div><div>B. intersection</div><div></div><div>C. substitution</div><div></div><div>D. quotient with a regular set</div><div></div><div></div><div></div><div>Q128. The recursive sets are not closed under</div><div></div><div>A. complementation</div><div></div><div>B. union</div><div></div><div>C. intersection</div><div></div><div>D. substitution</div><div></div><div></div><div></div><div>Q129. The recursivse sets are not closed under</div><div></div><div>A. homomorphism</div><div></div><div>B. e-free homomorphism</div><div></div><div>C. intersection</div><div></div><div>D. positive Kleene closure</div><div></div><div></div><div></div><div>Q130. The r.e. sets are not closed under</div><div></div><div>A. union</div><div></div><div>B. intersection</div><div></div><div>C. complement</div><div></div><div>D. reversal</div><div></div><div></div><div></div><div>Q131. The r.e. sets are not closed under</div><div></div><div>A. intersection</div><div></div><div>B. substitution</div><div></div><div>C. CYCLE</div><div></div><div>D. complement</div><div></div><div></div><div></div><div>Q132. The complement of a r.e. set L that is not recursive</div><div></div><div>A.may be recursive</div><div></div><div>B. is always r.e.</div><div></div><div>C. is not r.e.</div><div></div><div>D. may be a csl</div><div></div><div></div><div></div><div>Q133. Choose the false statement. The cfls are not closed under intersection. The intersection of two cfls may be</div><div></div><div>A. regular</div><div></div><div>B. cfl</div><div></div><div>C.csl</div><div></div><div>D. not r.e.</div><div></div><div></div><div></div><div>Q134. The DCFLs are not closed under(choose the false statement)</div><div></div><div>A. union, Kleene closure, homomorphism</div><div></div><div>B. positive Kleene closure, reversal</div><div></div><div>C. concatenation, INIT</div><div></div><div>D.complementation</div><div></div><div></div><div></div><div>Q135. The DCFLs are not clsoed under(choose the false statement)</div><div></div><div>A. union, substitution</div><div></div><div>B. MIN,MAX</div><div></div><div>C. intersection</div><div></div><div>D. inverse substitution</div><div></div><div></div><div></div><div>Q136. Choose the false statement. The following languages are closed under reversal</div><div></div><div>A. Regular</div><div></div><div>B. cfls</div><div></div><div>C.dcfls</div><div></div><div>D. recursive sets</div><div></div><div></div><div></div><div></div><div></div><div>Q137. Choose the false statement. The following languages are closed under reversal</div><div></div><div>A. r.e. sets</div><div></div><div>B. csls</div><div></div><div>C.dcfls</div><div></div><div>D. recursive sets</div><div></div><div></div><div></div><div>Q138. Choose the false statement. The following languages are closed under complement</div><div></div><div>A. regular sets</div><div></div><div>B. dcfls</div><div></div><div>C. cfls</div><div></div><div>D. recursive sets</div><div></div><div></div><div></div><div></div><div></div><div>Q139. Choose the false statement. The following languages are closed under complement</div><div></div><div>A. regualar sets</div><div></div><div>B. r.e. sets</div><div></div><div>C. dcfls</div><div></div><div>D. recursive sets</div><div></div><div></div><div></div><div>Q139. Choose the false statement. The following languages are closed under complement</div><div></div><div>A. regular sets</div><div></div><div>B. dcfls</div><div></div><div>C. finite sets</div><div></div><div>D. recursive sets</div><div></div><div></div><div></div><div>Q140. The following languages are closed under substitution(choose the false statement)</div><div></div><div>A. regular sets</div><div></div><div>B. dcfls</div><div></div><div>C. cfls</div><div></div><div>D. r.e. sets</div><div></div><div></div><div>Q141. The following languages are closed under substitution(choose the false statement)</div><div></div><div>A. regular sets</div><div></div><div>B. cfls</div><div></div><div>C. csls</div><div></div><div>D. recursive sets</div><div></div><div>A D V E R T I S E M E N T</div><div></div><div>Q142. Choose the false statement. The reversal of a dcfl L is</div><div></div><div>a. never r.e.</div><div></div><div>b. is always r.e.</div><div></div><div>c. is always a cfl</div><div></div><div>d. is always a csl</div><div></div><div></div><div></div><div>Q143. Choose the false statement. The reversal of a dcfl L is</div><div></div><div>a. always a dclf</div><div></div><div>b. always a cfl</div><div></div><div>c. always a recursive set</div><div></div><div>d. always a r.e. set</div><div></div><div></div><div></div><div>Q144. Choose the false statement. The union of two dcfls is</div><div></div><div>a. never r.e.</div><div></div><div>b. is always r.e.</div><div></div><div>c. is always a cfl</div><div></div><div>d. is always a csl</div><div></div><div></div><div></div><div>Q145. Choose the false statement. The union of two dcfls is</div><div></div><div>a. always a dclf</div><div></div><div>b. always a cfl</div><div></div><div>c. always a recursive set</div><div></div><div>d. always a r.e. set</div><div></div><div></div><div></div><div>Q146. The intersection of two cfls can simulate an arbitrary turing machine computation, and this can be used to show some problems are undecidable. The intersection of two cfls is (choose the false statement)</div><div></div><div>a. never regular</div><div></div><div>b. never a cfl</div><div></div><div>c. never a csl</div><div></div><div>d. always not r.e.</div><div></div><div></div><div></div><div>Q147. The intersection of two dcfls can simulate an arbitrary turing machine computation, and this can be used to show some problems are undecidable. The intersection of two dcfls is (choose the false statement)</div><div></div><div>a. never regular</div><div></div><div>b. never a cfl</div><div></div><div>c. never a csl</div><div></div><div>d. always not r.e.</div><div></div><div></div><div></div><div>Q148. The intersection of two csls can simulate an arbitrary turing machine computation, and this can be used to show some problems are undecidable. The intersection of two csls is (choose the false statement)</div><div></div><div>a. never a recursive set</div><div></div><div>b. never a cfl</div><div></div><div>c. never a csl</div><div></div><div>d. always not r.e.</div><div></div><div></div><div></div><div>Q149. It is not known at present if the csls are closed under complement. The complement of a csl(choose the false statement) is</div><div></div><div>a. never a cfl</div><div></div><div>b. never a csl</div><div></div><div>c. never a recursive set</div><div></div><div>d. may be a set which is not r.e.</div><div></div><div></div><div></div><div>Q150. The shuffle of languages L1 and L2 is obtained by shuffling the words of L1 with that of L2. Choose the false statement</div><div></div><div>a. the shuffle of two regular sets is regular</div><div></div><div>b. the shuffle of two cfls is a cfl</div><div></div><div>c. the shuffle of a cfl and a regular set is a cfl</div><div></div><div>d. the shuffle of a regular set and a cfl may be regular</div><div></div><div></div><div></div><div>Q151. The following problems are decidable</div><div></div><div>a. whether a turing machine has at least three states</div><div></div><div>b. whether a turing machine will ever halt</div><div></div><div>c. whether a turing machine will ever print a symbol</div><div></div><div>d. whether a turing machine will ever enter a designated state</div><div></div><div></div><div></div><div>Q152. The following problems are decidable</div><div></div><div>a. whether a turing machine ever leaves a particular cell it it scanning</div><div></div><div>b.whether a turing machine started on blank tape will ever halt</div><div></div><div>c. whether a turing machine accepts at least two strings</div><div></div><div>d. whether a turing machine accepts a finite set</div><div></div><div></div><div></div><div>Q153. The following problems are decidable</div><div></div><div>a. whether the tape alphabet has at least two symbols</div><div></div><div>b. whether a turing machine with 12 tapes will accept an infinite set</div><div></div><div>c. for ever string w the turing machine accepts it also accepts wR.</div><div></div><div>d. whether a turing machine will ever print three consecutive 1&#8217;s</div><div></div><div></div><div></div><div>Q154. Let L1={&lt;M&gt;| M is the encoding of a finite auotmaton} and w is a string in (0+1)*. Let L2={&lt;M&gt;| M is the encoding of a turing machine}. The following problems are decidable(choose the false statement)</div><div></div><div>a. Whether L1 contains w</div><div></div><div>b. Whether L1 is empty</div><div></div><div>c. Whether L1 is infinite</div><div></div><div>d. Whether L2=L1</div><div></div><div></div><div></div><div></div><div></div><div>Q155. Let L1={&lt;M&gt;| M is the encoding of a finite auotmaton} and w is a string in (0+1)*. Let L2={&lt;M&gt;| M is the encoding of a turing machine}. The following problems are decidable(choose the false statement)</div><div></div><div>a. Whether L1 contains all strings over the termainal vocabuary</div><div></div><div>b. Whether L1 is empty and regular</div><div></div><div>c. Whether L1 is infinite</div><div></div><div>d. Whether L2 is contained in L1</div><div></div><div></div><div></div><div>Q156. Let L1={&lt;M&gt;| M is the encoding of a finite auotmaton} and w is a string in (0+1)*. Let L2={&lt;M&gt;| M is the encoding of a turing machine}. The following problems are decidable(choose the false statement)</div><div></div><div>a. Whether the complement of L1 contains w</div><div></div><div>b. Whether the complement of L1 is empty</div><div></div><div>c. Whether the complement of L1 is infinite</div><div></div><div>d. Whether L2 intersection L1 is empty</div><div></div><div></div><div></div><div>Q157. Let L1={&lt;M&gt;| M is the encoding of a finite auotmaton} and w is a string in (0+1)*. Let L2={&lt;M&gt;| M is the encoding of a finite machine}. The following problems are decidable(choose the false statement)</div><div></div><div>a. Whether the complement of L1 contains w</div><div></div><div>b. Whether the complement of L1 is empty</div><div></div><div>c. Whether the complement of L1 is infinite</div><div></div><div>d. None of the above</div><div></div><div></div><div></div><div>Q156. Let L1={&lt;M&gt;| M is the encoding of a dpda} and w is a string in (0+1)*. Let L2={&lt;M&gt;| M is the encoding of a dpda machine}. The following problems are decidable(choose the false statement)</div><div></div><div>a. Whether the complement of L1 contains w</div><div></div><div>b. Whether the complement of L1 is empty</div><div></div><div>c. Whether the complement of L1 is infinite</div><div></div><div>d. Whether L2 intersection L1 is infinite</div><div></div><div></div><div></div><div>Q157. Let L1={&lt;M&gt;| M is the encoding of a dpda} and w is a string in (0+1)*. Let L2={&lt;M&gt;| M is the encoding of a dpda}. The following problems are decidable(choose the false statement)</div><div></div><div>a. Whether the complement of L1 contains w</div><div></div><div>b. Whether the complement of L1 is empty</div><div></div><div>c. Whether the complement of L1 is infinite</div><div></div><div>d. Whether L2 is contained in L1</div><div></div><div></div><div></div><div>Q158. Let L1={&lt;M&gt;| M is the encoding of a dpda} and w is a string in (0+1)*. Let L2={&lt;M&gt;| M is the encoding of a dpda}. The following problems are decidable(choose the false statement)</div><div></div><div>a. Whether the complement of L1 contains w</div><div></div><div>b. Whether the complement of L1 is empty</div><div></div><div>c. Whether the complement of L1 is infinite</div><div></div><div>d. Whether L2 intersection L1 is empty</div><div></div><div></div><div></div><div>Q159. Let L1={&lt;M&gt;| M is the encoding of a dpda} and w is a string in (0+1)*. Let L2={&lt;M&gt;| M is the encoding of a dpda}. The following problems are decidable(choose the false statement)</div><div></div><div>a. Whether the complement of L1 contains w</div><div></div><div>b. Whether the complement of L1 is empty</div><div></div><div>c. Whether the complement of L1 is infinite</div><div></div><div>d. Whether L2 intersection L1 is a dcfl</div><div></div><div></div><div></div><div>Q160. Let L1={&lt;M&gt;| M is the encoding of a dpda} and w is a string in (0+1)*. Let L2={&lt;M&gt;| M is the encoding of a dpda}. The following problems are decidable(choose the false statement)</div><div></div><div>a. Whether the complement of L1 is contained in L2</div><div></div><div>b. Whether the complement of L1 is empty</div><div></div><div>c. Whether the complement of L1 is infinite</div><div></div><div>d. Whether L2 intersection L1 is a csl</div><div></div><div></div><div>Q161. Let L1={&lt;M&gt;| M is the encoding of a pda} and w is a string in (0+1)*. Let L2={&lt;M&gt;| M is the encoding of a pda}. The following problems are decidable(choose the false statement)</div><div></div><div>a. Whether L1 contains w</div><div></div><div>b. Whether L1 is empty</div><div></div><div>c. Whether L1 is infinite</div><div></div><div>d. Whether L2 intersection L1 is empty</div><div></div><div>A D V E R T I S E M E N T</div><div></div><div>Q162. Let L1={&lt;M&gt;| M is the encoding of a pda} and w is a string in (0+1)*. Let L2={&lt;M&gt;| M is the encoding of a pda}. The following problems are decidable(choose the false statement)</div><div></div><div>a. Whether L1 contains w</div><div></div><div>b. Whether L1 is empty</div><div></div><div>c. Whether L1 is infinite</div><div></div><div>d. Whether L2 contains all strings over the terminal vocabulary</div><div></div><div></div><div></div><div>Q163. Let L1={&lt;M&gt;| M is the encoding of a pda} and w is a string in (0+1)*. Let L2={&lt;M&gt;| M is the encoding of a pda}. The following problems are decidable(choose the false statement)</div><div></div><div>a. Whether L1 contains w</div><div></div><div>b. Whether L1 is empty</div><div></div><div>c. Whether L1 is infinite</div><div></div><div>d. Whether L2 = L1</div><div></div><div></div><div></div><div>Q164. Let L1={&lt;M&gt;| M is the encoding of a pda} and w is a string in (0+1)*. Let L2={&lt;M&gt;| M is the encoding of a pda}. The following problems are decidable(choose the false statement)</div><div></div><div>a. Whether L1 contains w</div><div></div><div>b. Whether L1 is empty</div><div></div><div>c. Whether L1 is infinite</div><div></div><div>d. Whether L2 is contained in L1</div><div></div><div></div><div></div><div>Q165. Let L1={&lt;M&gt;| M is the encoding of a pda} and w is a string in (0+1)*. Let L2={&lt;M&gt;| M is the encoding of a finite automata}. The following problems are decidable(choose the false statement)</div><div></div><div>a. Whether L1 contains w</div><div></div><div>b. Whether L1 is empty</div><div></div><div>c. Whether L1 is infinite</div><div></div><div>d. Whether L2 = L1</div><div></div><div></div><div></div><div>Q166. Let L1={&lt;M&gt;| M is the encoding of a pda} and w is a string in (0+1)*. Let L2={&lt;M&gt;| M is the encoding of a pda}. The following problems are decidable(choose the false statement)</div><div></div><div>a. Whether L1 contains w</div><div></div><div>b. Whether L1 is empty</div><div></div><div>c. Whether L1 is infinite</div><div></div><div>d. Whether L2 intersection L1 is empty</div><div></div><div></div><div></div><div>Q167. Ram comes up with a universal language for cfls, Lucfl={&lt;M,x&gt;|M is the encoding of a pda that accepts w}. Choose the correct statement</div><div></div><div>a.Lucfl is a decidable language</div><div></div><div>b. Lucfl is partially decidable but not decidable</div><div></div><div>c.Lucfl is not partially decidable</div><div></div><div>d. Lucfl cannot exist</div><div></div><div></div><div></div><div>Q168. Ram comes up with a universal language for dcfls, Ludcfl={&lt;M,x&gt;|M is the encoding of a dpda that accepts w}. Choose the correct statement</div><div></div><div>a.Ludcfl is a decidable language</div><div></div><div>b. Ludcfl is partially decidable but not decidable</div><div></div><div>c.Ludcfl is not partially decidable</div><div></div><div>d. Ludcfl cannot exist</div><div></div><div></div><div></div><div>Q169. Ram comes up with a universal language for labas, Lulba={&lt;M,x&gt;|M is the encoding of a lba that accepts w}. Choose the correct statement</div><div></div><div>a.Lulba is a decidable language</div><div></div><div>b. Lulba is partially decidable but not decidable</div><div></div><div>c.Lulba is not partially decidable</div><div></div><div>d. Lulba cannot exist</div><div></div><div></div><div></div><div>Q170. Ram comes up with a universal language for turing machines, Lu={&lt;M,x&gt;|M is the encoding of a turing that accepts w}. Choose the correct statement</div><div></div><div>a.Lu is a decidable language</div><div></div><div>b. Lul is partially decidable but not decidable</div><div></div><div>c.Lul is not partially decidable</div><div></div><div>d. Lul cannot exist</div><div></div><div></div><div></div><div>Q171. Ram comes up with a universal language for halting turing machines, Lu={&lt;M,x&gt;|M is the encoding of a halting turing machine that accepts w}. Choose the correct statement</div><div></div><div>a.Lu is a decidable language</div><div></div><div>b. Lu is partially decidable but not decidable</div><div></div><div>c.Lu is not partially decidable</div><div></div><div>d. Lu cannot exist</div><div></div><div></div><div></div><div>Q172. Let L0={&lt;M,w,0&gt;| M is the encoding of a pda that halts on input w} and let L1={&lt;M,x,1&gt;| M is the encoding of a pda that does not halt on input w}</div><div></div><div>Define a language L=L0UL1.</div><div></div><div>What can be said about L?</div><div></div><div>a. L is decidable</div><div></div><div>b. L is partially decidable but not decidable</div><div></div><div>c. L is not partially decidable</div><div></div><div>d. L is accepted by a pda</div><div></div><div></div><div></div><div>Q173. Let L0={&lt;M,w,0&gt;| M is the encoding of a lba that halts on input w} and let L1={&lt;M,x,1&gt;| M is the encoding of a lba that does not halt on input w}</div><div></div><div>Define a language L=L0UL1.</div><div></div><div>What can be said about L?</div><div></div><div>a. L is decidable</div><div></div><div>b. L is partially decidable but not decidable</div><div></div><div>c. L is not partially decidable</div><div></div><div>d. L is accepted by a pda</div><div></div><div></div><div></div><div>Q174. The following problems of csls are decidable</div><div></div><div>a. the equivalence problem</div><div></div><div>b.the containment problem</div><div></div><div>c. the membership problem</div><div></div><div>d. the completeness problem</div><div></div><div></div><div></div><div>Q175.The following problems of csls are decidable</div><div></div><div>a. the emptiness problem</div><div></div><div>b.the finiteness problem</div><div></div><div>c. the infiniteness problem</div><div></div><div>d. whether the intersection of two csls is a csl</div><div></div><div></div><div></div><div>Q176. The following problems of csls are decidable</div><div></div><div>a. the equivalence problem</div><div></div><div>b. whether the intersection of two csls is empty</div><div></div><div>c. the regularity problem</div><div></div><div>d. whether the complement of a csl is a recursive set</div><div></div><div></div><div></div><div>Q177. The following problems of recursive sets are decidable</div><div></div><div>a. the membership problem</div><div></div><div>b. the emptiness problem</div><div></div><div>c.the completeness problem</div><div></div><div>d. the finiteness problem</div><div></div><div></div><div></div><div>Q178. The following problems of recursive sets are decidable</div><div></div><div>a. the infiniteness problem</div><div></div><div>b. the equivalence problem</div><div></div><div>c. the containment problem</div><div></div><div>d.whether the complement is recursive</div><div></div><div></div><div></div><div>Q179. The following problems of recursive sets are decidable</div><div></div><div>a. whether the recursive language is equal to a regular set R</div><div></div><div>b. the regularity problem</div><div></div><div>c. the equivalence problem</div><div></div><div>d. the completeness problem</div><div></div><div></div><div></div><div>Q180. The following problems of recursive sets are decidable</div><div></div><div>a. the halting problem</div><div></div><div>b. the equivalence to a given r.e. set</div><div></div><div>c. the equivalence to a given csl</div><div></div><div>d. the equivalence to a given cfl</div><div></div><div></div><div>Q181. The following problems of r.e. sets are decidable</div><div></div><div>a. the membership problem</div><div></div><div>b. the emptiness problem</div><div></div><div>c.the finiteness problem</div><div></div><div>d. whether the intersection of two r.e. sets is a language of the same type</div><div></div><div></div><div></div><div>Q182. The following problems of r.e. sets are decidable</div><div></div><div>a. the infiniteness problem</div><div></div><div>b.the equivalence problem</div><div></div><div>c. the containment problem</div><div></div><div>d. whether the union of two r.e. sets is of the same type</div><div></div><div>A D V E R T I S E M E N T</div><div></div><div>Q183. The following problems of r.e. sets are decidable</div><div></div><div>a. whether the intersection of two r.e. sets is empty</div><div></div><div>b. whether the r.e. set is equivalent to a given regular set</div><div></div><div>c. whether the r.e. set is regular</div><div></div><div>d. whether the Kleene closure of a r.e. set is a r.e. set</div><div></div><div></div><div></div><div>Q184. The following problems of r.e. sets are decidable</div><div></div><div>a. whether the complement of a r.e. set is r.e.</div><div></div><div>b.whether the r.e. set is a csl</div><div></div><div>c. whether the r.e. set is a cfl</div><div></div><div>d.whether the reversal of the r.e. set is r.e.</div><div></div><div></div><div></div><div>Q185. Choose the correct statement.</div><div></div><div>The following problems are decidable</div><div></div><div>a. whether a regular set is finite</div><div></div><div>b. whether a cfl is regular</div><div></div><div>c. whether a csl is a cfl</div><div></div><div>d. whether a recursive set is a csl</div><div></div><div></div><div></div><div>Q186. Choose the correct statement</div><div></div><div>The following problems are decidable</div><div></div><div></div><div>a. whether a dcfl is finite</div><div></div><div>b. whether a recursive set is a cfl</div><div></div><div>c. whether a r.e. set is a csl</div><div></div><div>d. whether a r.e. set is a dcfl</div><div></div><div></div><div></div><div>Q187. The following problems are decidable</div><div></div><div>Choose the correct statement</div><div></div><div>a. whether a dcfl is r.e.</div><div></div><div>b. whether a recursive set is regular</div><div></div><div>c. whether a recursive set if regular but not infinite</div><div></div><div>d. whether a r.e. set is a dcfl that is infinite</div><div></div><div></div><div></div><div>Q188. The following problems are NP-complete.(Choose the correct one).</div><div></div><div>a. 1SAT</div><div></div><div>b. 2SAT</div><div></div><div>c. 3SAT</div><div></div><div>d. hamiltonian circuit problem where the graph does not have more than 100^1000 nodes</div><div></div><div></div><div></div><div>Q189. The following problems are not NP-complete. (Choose the correct one).</div><div></div><div>a. 0/1 knapsack problem</div><div></div><div>b. node cover problem with the graphs having more than 100^100 nodes</div><div></div><div>c.edge cover problem with graphs having edges more than 100^100 nodes</div><div></div><div>d. travelling salesman problem with the number of nodes in the graph restricted to 100^100 nodes</div><div></div><div></div><div></div><div>Q190. The following problems are not NP-complete.(Choose the correct one).</div><div></div><div>a. the partition problem</div><div></div><div>b. the chromatic number problem</div><div></div><div>c. the integer programming problem</div><div></div><div>d. the all pairs shortest path problem</div><div></div><div></div><div></div><div>Q191. Choose the false statement</div><div></div><div>The following can be effectively enumerated</div><div></div><div>a. finite automata</div><div></div><div>b.deterministic push down automata</div><div></div><div>c. push down automata</div><div></div><div>d. halting turing machines</div><div></div><div></div><div></div><div>Q192. Choose the false statement</div><div></div><div>The following can be effectively enumerated</div><div></div><div>a. deterministic linear bounded automata</div><div></div><div>b. linear bounded automata</div><div></div><div>c.halting turing machines</div><div></div><div>d. turing machines</div><div></div><div></div><div></div><div>Q193. choose the false statement</div><div></div><div>The following can be effectively enumerated</div><div></div><div>a. multidimensional turing machines</div><div></div><div>b. multitrack turing machines</div><div></div><div>c. multiheaded turing machines</div><div></div><div>d. halting turing machines</div><div></div><div></div><div></div><div>Q194. Choose the false statement</div><div></div><div>The following can be effectively enumerated</div><div></div><div>a. finite sets</div><div></div><div>b. regular sets</div><div></div><div>c. dcfls</div><div></div><div>d. recursive sets</div><div></div><div></div><div></div><div>Q195. Choose the false statement</div><div></div><div>The following can be effectively enumerated</div><div></div><div>a. cfls</div><div></div><div>b.csls</div><div></div><div>c. recursive sets</div><div></div><div>d. r.e. sets</div><div></div><div></div><div></div><div>Q196. Choose the false statement</div><div></div><div>The following can be effectively enumerated</div><div></div><div>a. type-0 grammars</div><div></div><div>b. halting turing machines</div><div></div><div>c. type-1 grammars</div><div></div><div>d. type 2 grammars</div><div></div><div></div><div></div><div></div><div></div><div>Q197. Choose the false statement</div><div></div><div>The following can be effectively enumerated</div><div></div><div>a. type-0 grammars</div><div></div><div>b. halting turing machines</div><div></div><div>c. type-1 grammars</div><div></div><div>d. type 3 grammars</div><div></div><div></div><div></div><div>Q198. Ram and Shyam define universal languages as follows</div><div></div><div>L0={&lt;M,x,1&gt;|M is the encoding of a turing machine that accepts x}</div><div></div><div>L00={&lt;M,x,1&gt;|M is the encoding of a halting turing machine that accepts x}</div><div></div><div>L1={&lt;M,x,1&gt;| M is the encoding of a linear bounded automata that accepts x}</div><div></div><div>L2={&lt;M,x,1&gt;| M is the encoding of a push down automata that accepts x}</div><div></div><div>L22={&lt;M,x,1&gt;| M is the encoding of a dpda that accepts x}</div><div></div><div>L3={&lt;M,x,1&gt;| M is the encoding of a fa that accepts x}</div><div></div><div>Choose the correct statement</div><div></div><div>a. all the universal languages are r.e.</div><div></div><div>b. the complements of all the universal languages are r.e.</div><div></div><div>c. all the universal languages are recursive</div><div></div><div>d. except L00 all the universal languages are r.e.</div><div></div><div></div><div></div><div></div><div></div><div>Q199. Ram and Shyam define universal languages as follows</div><div></div><div>L0={&lt;M,x,1&gt;|M is the encoding of a turing machine that accepts x}</div><div></div><div>L00={&lt;M,x,1&gt;|M is the encoding of a halting turing machine that accepts x}</div><div></div><div>L1={&lt;M,x,1&gt;| M is the encoding of a linear bounded automata that accepts x}</div><div></div><div>L2={&lt;M,x,1&gt;| M is the encoding of a push down automata that accepts x}</div><div></div><div>L22={&lt;M,x,1&gt;| M is the encoding of a dpda that accepts x}</div><div></div><div>L3={&lt;M,x,1&gt;| M is the encoding of a fa that accepts x}</div><div></div><div>Choose the correct statement</div><div></div><div>a. all the universal languages are recursive.</div><div></div><div>b. the complements of all the universal languages are recursive</div><div></div><div>c. all the universal languages are r.e.</div><div></div><div>d. except L00 all the universal languages are r.e.</div><div></div><div></div><div></div><div>Q200. Ram and Shyam define universal languages as follows</div><div></div><div>L0={&lt;G,x,1&gt;|G is the encoding of a type 0 that generates x}</div><div></div><div>L00={&lt;G,x,1&gt;|G is the encoding of a type 0 grammar that generates a recursive set and generates x}</div><div></div><div>L1={&lt;G,x,1&gt;| G is the encoding of a type 1 grammar that generates x}</div><div></div><div>L2={&lt;G,x,1&gt;| G is the encoding of a type 2 grammar that generates x}</div><div></div><div>L22={&lt;G,x,1&gt;| G is the encoding of a LR(k) grammar that generates x}</div><div></div><div>L3={&lt;G,x,1&gt;| G is the encoding of a type 3 grammar that generates x}</div><div></div><div>Choose the correct statement</div><div></div><div>a. all the universal languages are r.e.</div><div></div><div>b. the complements of all the universal languages are r.e.</div><div></div><div>c. all the universal languages are recursive</div><div></div><div>d. except L00 all the universal languages are r.e.</div><div></div><div></div><div></div><div>Q201. Consider turing machines as enumerators.</div><div></div><div>We define a language L=[&lt;M&gt;| M is the encoding a turing machine that enumerates the strings it accepts in lexicographic order}.</div><div></div><div>Choose the correct statement.</div><div></div><div>a. L is a csl</div><div></div><div>b. L is recursive</div><div></div><div>c. L is r.e. and not recursive</div><div></div><div>d. L is not r.e.</div><div></div><div>A D V E R T I S E M E N T</div><div></div><div>Q202.Ram and Shyam decide to classify a hierarchy of turing machines as follows:</div><div></div><div>L0={&lt;M&gt;|M is the encoding of turing machines that accept the recursive sets}</div><div></div><div>L1={&lt;M&gt;|M is the encoding of turing machines that accept the csls}</div><div></div><div>L2={&lt;M&gt;|M is the encoding of turing machines that accept the cfls}</div><div></div><div>L22={&lt;M&gt;|M is the encoding of turing machines that accept the dcfls}</div><div></div><div>L3={&lt;M&gt;|M is the encoding of turing machines that accept the regular sets}</div><div></div><div>L4={&lt;M&gt;|M is the encoding of turing machines that accept the finite sets}</div><div></div><div>Choose the correct statement</div><div></div><div>a. all the above languages are recursive</div><div></div><div>b. all the above languages are r.e.</div><div></div><div>c. all the above languages are not r.e.</div><div></div><div>d. all the above languages are r.e and not recursive</div><div></div><div></div><div></div><div>Q203. The grammar</div><div></div><div>S----&gt;aSbS|bSaS|e is</div><div></div><div>a. ambiguous</div><div></div><div>b. generates an inherently ambiguous language</div><div></div><div>c. is not ambiguous</div><div></div><div>d. generates an unequal number of a's and b's</div><div></div><div></div><div></div><div>Q204. The grammar</div><div></div><div>S------&gt;aSbS|bSaS|e i</div><div></div><div>a. generates an equal number of a's and b's</div><div></div><div>b. generates an unequal number of a's and b's</div><div></div><div>c. generates more a's than b's</div><div></div><div>d.generates more b's than a's</div><div></div><div></div><div></div><div>Q205. The grammar</div><div></div><div>S---&gt;aB|bA</div><div></div><div>A-----&gt;a|aS|bAA</div><div></div><div>B-----&gt;b|bS|aBB</div><div></div><div>a. is ambiguous</div><div></div><div>b. generates an inherently ambiguous language</div><div></div><div>c.is unambiguous</div><div></div><div>d. generates an unequal number of a's and b's</div><div></div><div></div><div></div><div>Q206. The grammar</div><div></div><div>S---&gt;aB|bA</div><div></div><div>A-----&gt;a|aS|bAA</div><div></div><div>B-----&gt;b|bS|aBB</div><div></div><div>a. generates an equal number of a's and b's</div><div></div><div>b. generates an inherently ambiguous language</div><div></div><div>c.generates more a's than b's</div><div></div><div>d. generates an unequal number of a's and b's</div><div></div><div></div><div></div><div>Q207. The grammar</div><div></div><div>S---&gt;aSBC|aBC</div><div></div><div>aB---&gt;ab</div><div></div><div>bB----&gt;bb</div><div></div><div>bC---&gt;bc</div><div></div><div>cC----&gt;cc</div><div></div><div>a. generates a regular set</div><div></div><div>b.generates a cfl</div><div></div><div>c. generates a dcfl</div><div></div><div>d. generates a csl</div><div></div><div></div><div></div><div>Q208. The grammar</div><div></div><div>S---&gt;aSBC|aBC</div><div></div><div>aB---&gt;ab</div><div></div><div>bB----&gt;bb</div><div></div><div>bC---&gt;bc</div><div></div><div>cC----&gt;cc</div><div></div><div>a. generates the set of all strings with an equal number of a's, b's and c's</div><div></div><div>b.generates {a^nb^n C^n|n&gt;=1}l</div><div></div><div>c. generates more a's than b'sl</div><div></div><div>d. generates more b's than c's</div><div></div><div></div><div></div><div>Q209. The grammar</div><div></div><div>S---&gt;aSBC|aBC</div><div></div><div>aB---&gt;ab</div><div></div><div>bB----&gt;bb</div><div></div><div>bC---&gt;bc</div><div></div><div>cC----&gt;cc</div><div></div><div>a. is type-0 and not type-1</div><div></div><div>b.type-1 and not type-2</div><div></div><div>c. type-2 and not type-1l</div><div></div><div>d. type-3 and not type-2</div><div></div><div></div><div></div><div>Q210. The grammar</div><div></div><div>S---&gt;aSBC|aBC</div><div></div><div>aB---&gt;ab</div><div></div><div>bB----&gt;bb</div><div></div><div>bC---&gt;bc</div><div></div><div>cC----&gt;cc</div><div></div><div>a. is in CNF form</div><div></div><div>b.is in GNF form</div><div></div><div>c. generates a dcfl that is not regular</div><div></div><div>d. generates a csl that is not regular</div><div></div><div></div><div></div><div>Q211. The grammar</div><div></div><div>S---&gt;aSBC|aBC</div><div></div><div>aB---&gt;ab</div><div></div><div>bB----&gt;bb</div><div></div><div>bC---&gt;bc</div><div></div><div>cC----&gt;cc</div><div></div><div>generates a language that can be accepted by a</div><div></div><div>a. linear bounded automata</div><div></div><div>b.a push down automata</div><div></div><div>c. a deterministic push down automata</div><div></div><div>d. a finite automata</div><div></div><div></div><div></div><div>Q212. Consider the following grammar</div><div></div><div>S----&gt;bS|aA|b</div><div></div><div>A----&gt;bA|aB</div><div></div><div>B---&gt;bB|aS|a</div><div></div><div>Let Na(w) and Nb(w) denote the number of a's and b's in a string w. Then the language L(G) a subset of (a+b)+ generated by G is</div><div></div><div>A. {w| Na(w)&gt;3Nb(w)}</div><div></div><div>B.{w|Nb(w)&gt;3Na(w)}</div><div></div><div>C.{w|Na(w)=3k, k=0,1,2,...}</div><div></div><div>D.{w|Nb(w)=3k, k = 0,1,2,...} [GATE 2004]</div><div></div><div></div><div></div><div>Q213.. Consider the following grammar</div><div></div><div>S&#8212;-&gt;bS|aA|b</div><div></div><div>A&#8212;-&gt;bA|aB</div><div></div><div>B&#8212;&gt;bB|aS|a</div><div></div><div>Let Na(w) and Nb(w) denote the number of a&#8217;s and b&#8217;s in a string w in the reversal of the language. Then the language reversal of L(G) a subset of (a+b)+ generated by G is</div><div></div><div>A. {w| Na(w)&gt;3Nb(w)}</div><div></div><div>B.{w|Nb(w)&gt;3Na(w)}</div><div></div><div>C.{w|Na(w)=3k, k=0,1,2,&#8230;}</div><div></div><div>D.{w|Nb(w)=3k, k = 0,1,2,&#8230;} </div><div></div><div></div><div></div><div>Q214. Consider the following grammar</div><div></div><div>S&#8212;-&gt;Sb|Aa|b</div><div></div><div>A&#8212;-&gt;Ab|Ba</div><div></div><div>B&#8212;&gt;Bb|Sa|a</div><div></div><div>Let Na(w) and Nb(w) denote the number of a&#8217;s and b&#8217;s in a string w. Then the language L(G) a subset of (a+b)+ generated by G is</div><div></div><div>A. {w| Na(w)&gt;3Nb(w)}</div><div></div><div>B.{w|Nb(w)&gt;3Na(w)}</div><div></div><div>C.{w|Na(w)=3k, k=0,1,2,&#8230;}</div><div></div><div>D.{w|Nb(w)=3k, k = 0,1,2,&#8230;} </div><div></div><div></div><div></div><div>Q215. Consider the following grammar</div><div></div><div>S&#8212;-&gt;bS|aA|b</div><div></div><div>A&#8212;-&gt;bA|aB</div><div></div><div>B&#8212;&gt;bB|aS|a</div><div></div><div>The language generated by the grammar is</div><div></div><div>a. r.e but not recursive</div><div></div><div>b. recursive but not csl</div><div></div><div>c.csl but not cfl</div><div></div><div>d. regular but not finite</div><div></div><div></div><div></div><div>Q216. Consider the following grammar</div><div></div><div>S&#8212;-&gt;bS|aA|b</div><div></div><div>A&#8212;-&gt;bA|aB</div><div></div><div>B&#8212;&gt;bB|aS|a</div><div></div><div>The grammar is</div><div></div><div>a. type-0 but not type-1</div><div></div><div>b. type-1 but not type-2</div><div></div><div>c. type-2 but not type-3</div><div></div><div>d. type-3</div><div></div><div></div><div></div><div>Q217. Consider the grammar</div><div></div><div>S&#8212;&gt;AS|AA</div><div></div><div>A&#8212;&gt;aAb|ab</div><div></div><div>Let Na(w) and Nb(w) denote the number of a&#8217;s and b&#8217;s in a string w. Then the language L(G) a subset of (a+b)+ generated by G is</div><div></div><div>A. {w| Na(w)&gt;Nb(w)}</div><div></div><div>B.{w|Nb(w)&lt;Na(w)}</div><div></div><div>C.{w|Na(w)=Nb(W)}</div><div></div><div>D.{w|Nb(w)not related to Na(w)}</div><div></div><div></div><div></div><div>Q218. Consider the grammar</div><div></div><div>S&#8212;&gt;aSa|bSb|aa|bb</div><div></div><div></div><div></div><div>Let Na(w) and Nb(w) denote the number of a&#8217;s and b&#8217;s in a string w. Then the language L(G) a subset of (a+b)+ generated by G is</div><div></div><div>A. {w| Na(w)&gt;Nb(w)}</div><div></div><div>B.{w|Nb(w)&lt;Na(w)}</div><div></div><div>C.{w|Na(w)=Nb(W)}</div><div></div><div>D.{w|Nb(w)not related to Na(w)}</div><div></div><div></div><div></div><div>Q219. Consider the grammar</div><div></div><div>S&#8212;&gt;aSa|bSb|aSb|bSa|aa|ab|ba|bb</div><div></div><div>Let Na(w) and Nb(w) denote the number of a&#8217;s and b&#8217;s in a string w. Then the language L(G) a subset of (a+b)+ generated by G is</div><div></div><div>A. {w| Na(w)&gt;Nb(w)}</div><div></div><div>B.{w|Nb(w)&lt;Na(w)}</div><div></div><div>C.{w|Na(w)=Nb(W)}</div><div></div><div>D.{w|Nb(w)not related to Na(w)}</div><div></div><div></div><div></div><div>Q220. Consider the grammar</div><div></div><div>S&#8212;&gt;AB</div><div></div><div>A&#8212;&gt;aAb|ab</div><div></div><div>B&#8212;&gt;b|bB</div><div></div><div>Let Na(w) and Nb(w) denote the number of a&#8217;s and b&#8217;s in a string w. Then the language L(G) a subset of (a+b)+ generated by G is</div><div></div><div>A. {w| Na(w)&gt;Nb(w)}</div><div></div><div>B.{w|Nb(w)&lt;Na(w)}</div><div></div><div>C.{w|Na(w)=Nb(W)}</div><div></div><div>D.{w|Nb(w)not related to Na(w)}</div><div></div><div></div><div>Q221. Consider the grammar</div><div></div><div>S&#8212;&gt;ABABS|AB</div><div></div><div>A&#8212;&gt;a|aA</div><div></div><div>B&#8212;-&gt;b|bB</div><div></div><div>Let Na(w) and Nb(w) denote the number of a&#8217;s and b&#8217;s in a string w. Then the language L(G) a subset of (a+b)+ generated by G is</div><div></div><div>A. {w| Na(w)&gt;Nb(w)}</div><div></div><div>B.{w|Nb(w)&lt;Na(w)}</div><div></div><div>C.{w|Na(w)=Nb(W)}</div><div></div><div>D.{w|Nb(w)not related to Na(w)}</div><div></div><div>A D V E R T I S E M E N T</div><div></div><div>Q222.Consider the gramamar.</div><div></div><div>S&#8212;&gt;aaASb|ab</div><div></div><div>A&#8212;&gt;aAb|ab</div><div></div><div>Let Na(w) and Nb(w) denote the number of a&#8217;s and b&#8217;s in a string w. Then the language L(G) a subset of (a+b)+ generated by G is</div><div></div><div>A. {w| Na(w)&gt;Nb(w)}</div><div></div><div>B.{w|Nb(w)&lt;Na(w)}</div><div></div><div>C.{w|Na(w)=Nb(W)}</div><div></div><div>D.{w|Nb(w)not related to Na(w)}</div><div></div><div></div><div></div><div>Q223. The language {a^n b^n c^n|n&gt;1}</div><div></div><div>a. can be generated by a type 3 grammar</div><div></div><div>b. can be generated by an LR(k) grammar</div><div></div><div>c. can be generated by a type 2 grammar</div><div></div><div>d. can be generated by a type 1 grammar</div><div></div><div></div><div></div><div></div><div></div><div>Q224. The language {a^i b^j c^k|i&gt;j&gt;k}</div><div></div><div>a. can be generated by a type 3 grammar</div><div></div><div>b. can be generated by an LR(k) grammar</div><div></div><div>c. can be generated by a type 2 grammar</div><div></div><div>d. can be generated by a type 1 grammar</div><div></div><div></div><div></div><div>Q225. The language {a^i b^j c^k|k=min(i,j)}</div><div></div><div>a. can be generated by a type 3 grammar</div><div></div><div>b. can be generated by an LR(k) grammar</div><div></div><div>c. can be generated by a type 2 grammar</div><div></div><div>d. can be generated by a type 1 grammar</div><div></div><div></div><div></div><div>Q226. The language {a^i b^j c^k|k=max(i,j)}</div><div></div><div>a. can be generated by a type 3 grammar</div><div></div><div>b. can be generated by an LR(k) grammar</div><div></div><div>c. can be generated by a type 2 grammar</div><div></div><div>d. can be generated by a type 1 grammar</div><div></div><div></div><div></div><div>Q227. The language {a^n^2|n&gt;1}</div><div></div><div>a. can be generated by a type 3 grammar</div><div></div><div>b. can be generated by an LR(k) grammar</div><div></div><div>c. can be generated by a type 2 grammar</div><div></div><div>d. can be generated by a type 1 grammar</div><div></div><div></div><div></div><div>Q228. The language {a^2^n|n&gt;1}</div><div></div><div>a. can be generated by a type 3 grammar</div><div></div><div>b. can be generated by an LR(k) grammar</div><div></div><div>c. can be generated by a type 2 grammar</div><div></div><div>d. can be generated by a type 1 grammar</div><div></div><div></div><div></div><div>Q229. The language {a^n|n&gt;prime}</div><div></div><div>a. can be generated by a type 3 grammar</div><div></div><div>b. can be generated by an LR(k) grammar</div><div></div><div>c. can be generated by a type 2 grammar</div><div></div><div>d. can be generated by a type 1 grammar</div><div></div><div></div><div></div><div>Q230. The language {a^n|n not prime}</div><div></div><div>a. can be generated by a type 3 grammar</div><div></div><div>b. can be generated by an LR(k) grammar</div><div></div><div>c. can be generated by a type 2 grammar</div><div></div><div>d. can be generated by a type 1 grammar</div><div></div><div></div><div></div><div>Q231. The language {ww|w in (0+1)+}</div><div></div><div>a. can be generated by a type 3 grammar</div><div></div><div>b. can be generated by an LR(k) grammar</div><div></div><div>c. can be generated by a type 2 grammar</div><div></div><div>d. can be generated by a type 1 grammar</div><div></div><div></div><div></div><div>Q232. The language {a^n!|n&gt;1}</div><div></div><div>a. can be generated by a type 3 grammar</div><div></div><div>b. can be generated by an LR(k) grammar</div><div></div><div>c. can be generated by a type 2 grammar</div><div></div><div>d. can be generated by a type 1 grammar</div><div></div><div></div><div></div><div>Q233. The language {a^i b^j c^k|i&lt;&gt;j and j&lt;&gt;k and k&lt;&gt;i}</div><div></div><div>a. can be generated by a type 3 grammar</div><div></div><div>b. can be generated by an LR(k) grammar</div><div></div><div>c. can be generated by a type 2 grammar</div><div></div><div>d. can be generated by a type 1 grammar</div><div></div><div></div><div></div><div>Q234. The language {a^i b^j c^k|i=j or j=k or k=i}</div><div></div><div>a. can be generated by a type 3 grammar</div><div></div><div>b. can be generated by an LR(k) grammar</div><div></div><div>c. cannot be generated by a type 2 grammar</div><div></div><div>d. can be generated by a type 1 grammar</div><div></div><div></div><div></div> ]]></content:encoded> <wfw:commentRss>http://www.freequestionbank.com/question/gatetheory-of-computation/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>C Interview Questions</title><link>http://www.freequestionbank.com/question/c-interview-questions/</link> <comments>http://www.freequestionbank.com/question/c-interview-questions/#comments</comments> <pubDate>Thu, 26 Mar 2009 07:43:04 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Exam]]></category> <category><![CDATA[Languages]]></category> <category><![CDATA[Question]]></category> <category><![CDATA[c++]]></category> <category><![CDATA[Interview]]></category><guid
isPermaLink="false">http://www.freequestionbank.com/?p=420</guid> <description><![CDATA[1.Difference between arrays and pointers?
- Pointers are used to manipulate data using the address. Pointers use * operator to ...]]></description> <content:encoded><![CDATA[<table
id="AutoNumber1" style="border-collapse: collapse; height: 354px;" border="0" cellspacing="0" cellpadding="0" width="100%" bordercolor="#111111"><tbody><tr><td
width="97%" height="240" valign="top"><span
style="font-weight: 400;"><strong><span
style="font-size: x-small;">1.Difference between arrays and pointers?</span></strong><span
style="font-size: x-small;"><span
class="Apple-converted-space"> </span><br
/> - Pointers are used to manipulate data using the address. Pointers use * operator to access the data pointed to by them</p><p>- Arrays use subscripted variables to access and manipulate data.Array variables can be equivalently written using pointer expression.<span
class="Apple-converted-space"> </span></p><p></span></span><span
style="font-weight: 400;"><span
style="font-size: x-small;">2<strong>. What are the advantages of the functions?</strong></span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;"> <strong>Answer</strong> &#8211; Debugging is easier</span></span></p><p>- It is easier to understand the logic involved in the program<br
/> - Testing is easier<br
/> - Recursive call is possible<br
/> - Irrelevant details in the user point of view are hidden in functions<br
/> - Functions are helpful in generalizing the program<span
class="Apple-converted-space"> </span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">3<strong><span
class="Apple-converted-space"> </span>How can I open a file so that other programs can update it at the same time?</strong></span></span></p><p><span
style="font-weight: 400;"><strong><span
style="font-size: x-small;">Answer</span></strong><span
style="font-size: x-small;"><span
class="Apple-converted-space"> </span>Your C compiler library contains a low-level file function called sopen() that can be used to open a file in shared mode. Beginning with DOS 3.0, files could be opened in shared mode by loading a special program named SHARE.EXE. Shared mode, as the name implies, allows a file to be shared with other programs as well as your own.</span></span></p><p>Using this function, you can allow other programs that are running to update the same file you are updating.</p><p>The sopen() function takes four parameters: a pointer to the filename you want to open, the operational<br
/> mode you want to open the file in, the file sharing mode to use, and, if you are creating a file, the mode to create the file in. The second parameter of the sopen() function, usually referred to as the “operation flag”parameter, can have the following values assigned to it:</p><p>Constant Description O_APPEND Appends all writes to the end of the file</p><p>O_BINARY Opens the file in binary (untranslated) mode<br
/> O_CREAT If the file does not exist, it is created<br
/> O_EXCL If the O_CREAT flag is used and the file exists, returns an error<br
/> O_RDONLY Opens the file in read-only mode<br
/> O_RDWR Opens the file for reading and writing<br
/> O_TEXT Opens the file in text (translated) mode<br
/> O_TRUNC Opens an existing file and writes over its contents<br
/> O_WRONLY Opens the file in write-only mode</p><p>The third parameter of the sopen() function, usually referred to as the “sharing flag,” can have the following values assigned to it:</p><p>Constant Description<br
/> SH_COMPAT No other program can access the file<br
/> SH_DENYRW No other program can read from or write to the file<br
/> SH_DENYWR No other program can write to the file<br
/> SH_DENYRD No other program can read from the file<br
/> SH_DENYNO Any program can read from or write to the file</p><p>If the sopen() function is successful, it returns a non-negative number that is the file’s handle. If an error occurs, –1 is returned, and the global variable errno is set to one of the following values:</p><p>Constant Description<br
/> ENOENT File or path not found<br
/> EMFILE No more file handles are available<br
/> EACCES Permission denied to access file<br
/> EINVACC Invalid access code<br
/> Constant Description<span
class="Apple-converted-space"> </span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">4.<span
class="Apple-converted-space"> </span><strong>Can static variables be declared in a header file?</strong></span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;"> You can’t declare a static variable without defining it as well (this is because the storage class modifiers<br
/> static and extern are mutually exclusive). A static variable can be defined in a header file, but this would cause each source file that included the header file to have its own private copy of the variable, which is probably not what was intended.<span
class="Apple-converted-space"> </span><br
/> 6.<strong>How can you check to see whether a symbol is defined?</strong></span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;"> You can use the #ifdef and #ifndef preprocessor directives to check whether a symbol has been defined<br
/> (#ifdef) or whether it has not been defined (#ifndef).<span
class="Apple-converted-space"> </span><br
/> </span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">7.<strong>How do you override a defined macro?</strong></span></span></p><p><span
style="font-weight: 400;"><strong><span
style="font-size: x-small;">Answer</span></strong><span
style="font-size: x-small;"><span
class="Apple-converted-space"> </span><br
/> You can use the #undef preprocessor directive to undefine (override) a previously defined macro.<span
class="Apple-converted-space"> </span><br
/> </span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">10.<span
class="Apple-converted-space"> </span><strong>Can a variable be both const and volatile?</strong></span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;"> Yes. The const modifier means that this code cannot change the value of the variable, but that does not mean that the value cannot be changed by means outside this code. For instance, in the example in<br
/> FAQ 8, the timer structure was accessed through a volatile const pointer. The function itself did not change the value of the timer, so it was declared const. However, the value was changed by hardware on the computer, so it was declared volatile. If a variable is both const and volatile, the two modifiers can appear in either order.<span
class="Apple-converted-space"> </span><br
/> 11.<span
class="Apple-converted-space"> </span><strong>Can include files be nested?</strong></span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;"> <span
class="Apple-converted-space"> </span><br
/> Yes. Include files can be nested any number of times. As long as you use precautionary measures , you can avoid including the same file twice. In the past, nesting header files was seen as bad programming practice, because it complicates the dependency tracking function of the MAKE program and thus slows down compilation. Many of today’s popular compilers make up for this difficulty by implementing a concept called precompiled headers, in which all headers and associated dependencies are stored in<br
/> a precompiled state.<span
class="Apple-converted-space"> </span></span></span></p><p>Many programmers like to create a custom header file that has #include statements for every header needed for each module. This is perfectly acceptable and can help avoid potential problems relating to #include files, such as accidentally omitting an #include file in a module.<span
class="Apple-converted-space"> </span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">12.<span
class="Apple-converted-space"> </span><strong>Can static variables be declared in a header file?<span
class="Apple-converted-space"> </span><br
/> </strong>Yes there is difference between declaring a static variable as global and local. If it is local, it can be accessed only in the function where it&#8217;s declared. But if it is global, all functions can access it. But, what ever be the case, its value will be retained between functions.<br
/> </span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">13.<span
class="Apple-converted-space"> </span><strong>When does the compiler not implicitly generate the address of the first element of an array?</strong></span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;"> Whenever an array name appears in an expression such as</span></span></p><p>- array as an operand of the sizeof operator</p><p>- array as an operand of &amp; operator</p><p>- array as a string literal initializer for a character array</p><p>Then the compiler does not implicitly generate the address of the address of the first element of an array.<span
class="Apple-converted-space"> </span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">14.<strong>What is the difference between #include &lt;file&gt; and #include “file”?</strong></span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">When writing your C program, you can include files in two ways. The first way is to surround the file you<br
/> want to include with the angled brackets &lt; and &gt;. This method of inclusion tells the preprocessor to look for the file in the predefined default location. This predefined default location is often an INCLUDE environment variable that denotes the path to your include files. For instance, given the INCLUDE variable</span></span></p><p>INCLUDE=C:\COMPILER\INCLUDE;S:\SOURCE\HEADERS;</p><p>using the #include &lt;file&gt; version of file inclusion, the compiler first checks the C:\COMPILER\INCLUDE<br
/> directory for the specified file. If the file is not found there, the compiler then checks the<br
/> S:\SOURCE\HEADERS directory. If the file is still not found, the preprocessor checks the current directory.<span
class="Apple-converted-space"> </span></p><p>The second way to include files is to surround the file you want to include with double quotation marks. This method of inclusion tells the preprocessor to look for the file in the current directory first, then look for it in the predefined locations you have set up. Using the #include “file” version of file inclusion and applying it to the preceding example, the preprocessor first checks the current directory for the specified file. If the file is not found in the current directory, the C:COMPILERINCLUDE directory is searched. If the file is still not found, the preprocessor checks the S:SOURCEHEADERS directory.<br
/> The #include &lt;file&gt; method of file inclusion is often used to include standard headers such as stdio.h or<br
/> stdlib.h. This is because these headers are rarely (if ever) modified, and they should always be read from your compiler’s standard include file directory.</p><p>The #include “file” method of file inclusion is often used to include nonstandard header files that you have created for use in your program. This is because these headers are often modified in the current directory, and you will want the preprocessor to use your newly modified version of the header rather than the older, unmodified version.<span
class="Apple-converted-space"> </span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">15.<strong>When function say abc() calls another function say xyz(), what happens in stack?<br
/> </strong>When some function xyz() calls function abc(). all the local variables, static links, dynamic links and function return value goes on the top of all elements of function xyz() in the stack. when abc() exit it&#8217;s return value has been assigned to xyz().<span
class="Apple-converted-space"> </span><br
/> </span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">16.<strong>How do you print an address?<span
class="Apple-converted-space"> </span><br
/> </strong>we can print the address of a variable or a function using the following specifiers %u,%p here %u prints address in decimal form and %p prints in hexa decimal form,but remember these two format specifiers print only offset adress but they doesn&#8217;t print code segment address<span
class="Apple-converted-space"> </span></span></span></p><p>there is a another specifier %Fp which prints both the code segment and offset address</p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">18.<strong>How to find entered number is EVEN or ODD without using conditional statement(not using if.. else,if.. , else if..,while, do&#8230; while&#8230;., for&#8230;.)<br
/> </strong>We can find a number is odd or even by a simple programmain(){int a[2],i;a[0]=0; //0&#8211;means Even Numbera[1]=1; //1&#8211;means Odd numberscanf(&#8220;%d&#8221;,&amp;i);printf(&#8220;%d&#8221;,a[i%2]);getch();}<span
class="Apple-converted-space"> </span><br
/> </span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">19.<strong>How to break cycle in circular single link list?<br
/> </strong>we can delete an intermediate one</span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">20.<strong>How can I convert a number to a string?<span
class="Apple-converted-space"> </span><br
/> </strong>We can convert number to string using built in function itoa().</span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">21.<strong>How to swap the content oftwo variables without a temporary variable<br
/> </strong>void swap(int a,int b)</span></span></p><p>{</p><p>a =a+b;</p><p>b=a-b;</p><p>a=a-b;</p><p>}</p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">22.<span
class="Apple-converted-space"> </span><strong>How can send unlimited no of arguments to a function, eg printf function can take any no of arguments<br
/> </strong><br
/> using va_list variables in stdarg.h headerfile</span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">23.<strong>What is the benefit of using #define to declare a constant?</strong><span
class="Apple-converted-space"> </span><br
/> Using the #define method of declaring a constant enables you to declare a constant in one place and use it throughout your program. This helps make your programs more maintainable, because you need to maintain only the #define statement and not several instances of individual constants throughout your program.</span></span></p><p>For instance, if your program used the value of pi (approximately 3.14159) several times, you might want to declare a constant for pi as follows:</p><p>#define PI 3.14159</p><p>Using the #define method of declaring a constant is probably the most familiar way of declaring constants to traditional C programmers. Besides being the most common method of declaring constants, it also takes up the least memory. Constants defined in this manner are simply placed directly into your source code, with no variable space allocated in memory. Unfortunately, this is one reason why most debuggers cannot inspect constants created using the #define method.<span
class="Apple-converted-space"> </span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">24.<strong>How do you write a C program which can calculate lines of code but not counting comments?<br
/> </strong><br
/> Using file concept with Command line arguments.declare a variable (lcnt) used to count the no of lines.Open a file in read made and then using while loop check the condition for not equal to EOF.Later using if condition check check for new line and increment the variable for counting the lines.</span></span></p><p>Then using while,check for the character &#8216;/&#8217;,'*&#8217; (as the comments start with these characters) and end with (&#8216;*&#8217; and &#8216;/&#8217;).if condition of this is true then break and come out of the block else increment the line.</p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">25.<strong>How can I search for data in a linked list?</strong></span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;"> Unfortunately, the only way to search a linked list is with a linear search, because the only way a linked list’s members can be accessed is sequentially. Sometimes it is quicker to take the data from a linked list and store it in a different data structure so that searches can be more efficient.<span
class="Apple-converted-space"> </span><br
/> </span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">26.<strong>How to write a C program to find the power of 2 in a normal way and in single step?<br
/> </strong><br
/> U can take logarithm base 2, and check the result is in interger form or floating point form, u can check whether it is power of 2 or not.<span
class="Apple-converted-space"> </span><br
/> </span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">27.<strong>What is hashing?</strong><span
class="Apple-converted-space"> </span><br
/> To hash means to grind up, and that’s essentially what hashing is all about. The heart of a hashing algorithm is a hash function that takes your nice, neat data and grinds it into some random-looking integer.</span></span></p><p>The idea behind hashing is that some data either has no inherent ordering (such as images) or is expensive to compare (such as images). If the data has no inherent ordering, you can’t perform comparison searches.</p><p>If the data is expensive to compare, the number of comparisons used even by a binary search might be too many. So instead of looking at the data themselves, you’ll condense (hash) the data to an integer (its hash value) and keep all the data with the same hash value in the same place. This task is carried out by using the hash value as an index into an array.</p><p>To search for an item, you simply hash it and look at all the data whose hash values match that of the data you’re looking for. This technique greatly lessens the number of items you have to look at. If the parameters are set up with care and enough storage is available for the hash table, the number of comparisons needed to find an item can be made arbitrarily close to one.</p><p>One aspect that affects the efficiency of a hashing implementation is the hash function itself. It should ideally distribute data randomly throughout the entire hash table, to reduce the likelihood of collisions. Collisions occur when two different keys have the same hash value. There are two ways to resolve this problem. In “open addressing,” the collision is resolved by the choosing of another position in the hash table for the element inserted later. When the hash table is searched, if the entry is not found at its<br
/> hashed position in the table, the search continues checking until either the element is found or an empty position in the table is found<span
class="Apple-converted-space"> </span></p><p>The second method of resolving a hash collision is called “chaining.” In this method, a “bucket” or linked list holds all the elements whose keys hash to the same value.<span
class="Apple-converted-space"> </span></p><p>When the hash table is searched, the list must be searched linearly.<span
class="Apple-converted-space"> </span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">28.<strong>Diffence arrays and pointers?<br
/> </strong><br
/> To access data using pointers we use the *.</span></span></p><p>to access data stored in array we use indexes such as a[0].</p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">30.<strong>Can a variable be both const and volatile?<span
class="Apple-converted-space"> </span><br
/> </strong><br
/> This is possible and mostly used in embedded system.The example is Interrupt Status Register.As it is a status register , in the program we should not modify this variable.So it should be a constant.But this variable can be changed by the processor or hardware based on the interrupt condition.So when in the program ,we want to read the value of this varible , it should read the actual value with out any optimisation.For this reason ,the variable can be declared as volatile too</span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">31.<strong>Why should we assign NULL to the elements (pointer) after freeing them?</strong></span></span></p><p><span
style="font-weight: 400;"><strong><span
style="font-size: x-small;">Answer</span></strong><span
style="font-size: x-small;"><span
class="Apple-converted-space"> </span><br
/> This is paranoia based on long experience. After a pointer has been freed, you can no longer use the pointed-to data. The pointer is said to “dangle”; it doesn’t point at anything useful. If you “NULL out” or “zero out” a pointer immediately after freeing it, your program can no longer get in trouble by using that pointer. True, you might go indirect on the null pointer instead, but that’s something your debugger might be able to help you with immediately. Also, there still might be copies of the pointer that refer<br
/> to the memory that has been deallocated; that’s the nature of C. Zeroing out pointers after freeing them won’t solve all problems;<span
class="Apple-converted-space"> </span><br
/> </span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">32.<strong>What is a “null pointer assignment” error? What are bus errors, memory faults, and core dumps?</strong><span
class="Apple-converted-space"> </span><br
/> These are all serious errors, symptoms of a wild pointer or subscript.</span></span></p><p>Null pointer assignment is a message you might get when an MS-DOS program finishes executing. Some<br
/> such programs can arrange for a small amount of memory to be available “where the NULL pointer points to” (so to speak). If the program tries to write to that area, it will overwrite the data put there by the compiler.</p><p>When the program is done, code generated by the compiler examines that area. If that data has been changed, the compiler-generated code complains with null pointer assignment.</p><p>This message carries only enough information to get you worried. There’s no way to tell, just from a null<br
/> pointer assignment message, what part of your program is responsible for the error. Some debuggers, and some compilers, can give you more help in finding the problem.</p><p>Bus error: core dumped and Memory fault: core dumped are messages you might see from a program running under UNIX. They’re more programmer friendly. Both mean that a pointer or an array subscript was wildly out of bounds. You can get these messages on a read or on a write. They aren’t restricted to null pointer problems.</p><p>The core dumped part of the message is telling you about a file, called core, that has just been written in your current directory. This is a dump of everything on the stack and in the heap at the time the program was running. With the help of a debugger, you can use the core dump to find where the bad pointer was used.</p><p>That might not tell you why the pointer was bad, but it’s a step in the right direction. If you don’t have write permission in the current directory, you won’t get a core file, or the core dumped message.<span
class="Apple-converted-space"> </span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">33.</span><strong><span
style="font-size: x-small;">What are storage class in c</span></strong></span></p><p><span
style="font-weight: 400;"><strong><span
style="font-size: x-small;">Answer</span></strong><span
style="font-size: x-small;"><span
class="Apple-converted-space"> </span><br
/> There r of 4 type of storage class in C</span></span></p><p>static</p><p>auto</p><p>register</p><p>extern</p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">34.<strong>Following declarations are different from one another<br
/> const char *const s;<span
class="Apple-converted-space"> </span><br
/> char const *const s;<span
class="Apple-converted-space"> </span></strong></span></span></p><p><strong>Answer</strong><span
class="Apple-converted-space"> </span><br
/> There is no difference between the two declarations.</p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">35.<strong>When should a type cast be used?</strong></span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;"><br
/> There are two situations in which to use a type cast. The first use is to change the type of an operand to an arithmetic operation so that the operation will be performed properly.</span></span></p><p>The second case is to cast pointer types to and from void * in order to interface with functions that expect or return void pointers. For example, the following line type casts the return value of the call to malloc() to be a pointer to a foo structure.<span
class="Apple-converted-space"> </span></p><p>struct foo *p = (struct foo *) malloc(sizeof(struct foo));<span
class="Apple-converted-space"> </span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">36.<strong>What is a null pointer?</strong></span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">There are times when it’s necessary to have a pointer that doesn’t point to anything. The macro NULL, defined in &lt;stddef.h&gt;, has a value that’s guaranteed to be different from any valid pointer. NULL is a literal zero, possibly cast to void* or char*. Some people, notably C++ programmers, prefer to use 0 rather than NULL.</span></span></p><p>The null pointer is used in three ways:</p><p>1) To stop indirection in a recursive data structure</p><p>2) As an error value</p><p>3) As a sentinel value<span
class="Apple-converted-space"> </span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">36.</span></span><strong><span
style="font-weight: 400;"><span
style="font-size: x-small;">What is a const pointer?</span></span></strong></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;"><br
/> There are cases when you need to define a constant pointer to a variable/object; for instance, when taking a function address, or when you want to protect a pointer from unintended modifications such as assignment of new address, pointer arithmetic, etc. In fact, an object’s this is a constpointer. A constant pointer is declared:</span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">37.<strong>when should the volatile modifier be used?</strong></span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;"><br
/> The volatile modifier is a directive to the compiler’s optimizer that operations involving this variable should not be optimized in certain ways. There are two special cases in which use of the volatile modifier is desirable. The first case involves memory-mapped hardware (a device such as a graphics adaptor that appears to the computer’s hardware as if it were part of the computer’s memory), and the second involves shared memory (memory used by two or more programs running simultaneously).</span></span></p><p>Most computers have a set of registers that can be accessed faster than the computer’s main memory. A good compiler will perform a kind of optimization called “redundant load and store removal.” The compiler looks for places in the code where it can either remove an instruction to load data from memory because the value is already in a register, or remove an instruction to store data to memory because the value can stay in a register until it is changed again anyway.</p><p>If a variable is a pointer to something other than normal memory, such as memory-mapped ports on a<br
/> peripheral, redundant load and store optimizations might be detrimental. For instance, here’s a piece of code that might be used to time some operation:<span
class="Apple-converted-space"> </span></p><p>time_t time_addition(volatile const struct timer *t, int a)<br
/> {<br
/> int n;<br
/> int x;<br
/> time_t then;<br
/> x = 0;<br
/> then = t-&gt;value;<br
/> for (n = 0; n &lt; 1000; n++)<br
/> {<br
/> x = x + a;<br
/> }<br
/> return t-&gt;value &#8211; then;<br
/> }</p><p>In this code, the variable t-&gt;value is actually a hardware counter that is being incremented as time passes. The function adds the value of a to x 1000 times, and it returns the amount the timer was incremented by while the 1000 additions were being performed. Without the volatile modifier, a clever optimizer might assume that the value of t does not change during the execution of the function, because there is no statement that explicitly changes it. In that case, there’s no need to read it from memory a second time and subtract it, because the answer will always be 0. The compiler might therefore “optimize” the function by making it always return 0.</p><p>If a variable points to data in shared memory, you also don’t want the compiler to perform redundant load and store optimizations. Shared memory is normally used to enable two programs to communicate with each other by having one program store data in the shared portion of memory and the other program read the same portion of memory. If the compiler optimizes away a load or store of shared memory, communication between the two programs will be affected.<span
class="Apple-converted-space"> </span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">38.<strong>What is the benefit of using an enum rather than a #define constant?</strong></span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">The use of an enumeration constant (enum) has many advantages over using the traditional symbolic constant style of #define. These advantages include a lower maintenance requirement, improved program readability, and better debugging capability.</span></span></p><p>1) The first advantage is that enumerated constants are generated automatically by the compiler. Conversely, symbolic constants must be manually assigned values by the programmer.</p><p>For instance, if you had an enumerated constant type for error codes that could occur in your program, your enum definition could look something like this:</p><p>enum Error_Code<br
/> {<br
/> OUT_OF_MEMORY,<br
/> INSUFFICIENT_DISK_SPACE,<br
/> LOGIC_ERROR,<br
/> FILE_NOT_FOUND<br
/> };</p><p>In the preceding example, OUT_OF_MEMORY is automatically assigned the value of 0 (zero) by the compiler because it appears first in the definition. The compiler then continues to automatically assign numbers to the enumerated constants, making INSUFFICIENT_DISK_SPACE equal to 1, LOGIC_ERROR equal to 2, and FILE_NOT_FOUND equal to 3, so on.</p><p>If you were to approach the same example by using symbolic constants, your code would look something like this:</p><p>#define OUT_OF_MEMORY 0<br
/> #define INSUFFICIENT_DISK_SPACE 1<br
/> #define LOGIC_ERROR 2<br
/> #define FILE_NOT_FOUND 3</p><p>values by the programmer. Each of the two methods arrives at the same result: four constants assigned numeric values to represent error codes. Consider the maintenance required, however, if you were to add two constants to represent the error codes DRIVE_NOT_READY and CORRUPT_FILE. Using the enumeration constant method, you simply would put these two constants anywhere in the enum definition. The compiler would generate two unique values for these constants. Using the symbolic constant method, you would have to manually assign two new numbers to these constants. Additionally, you would want to ensure that the numbers you assign to these constants are unique.</p><p>2) Another advantage of using the enumeration constant method is that your programs are more readable and thus can be understood better by others who might have to update your program later.</p><p>3) A third advantage to using enumeration constants is that some symbolic debuggers can print the value of an enumeration constant. Conversely, most symbolic debuggers cannot print the value of a symbolic constant. This can be an enormous help in debugging your program, because if your program is stopped at a line that uses an enum, you can simply inspect that constant and instantly know its value. On the other hand, because most debuggers cannot print #define values, you would most likely have to search for that value by manually looking it up in a header file.<span
class="Apple-converted-space"> </span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">39.<strong>When is a switch statement better than multiple if statements?<span
class="Apple-converted-space"> </span><br
/> </strong><br
/> The switch statement is better than multiple if statements when there are more than two alternatives to be selected whether the case value matches to the variable of either character or integer type.<span
class="Apple-converted-space"> </span><br
/> </span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">40.<strong>What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?</strong><span
class="Apple-converted-space"> </span><br
/> The strcpy() function is designed to work exclusively with strings. It copies each byte of the source string to the destination string and stops when the terminating null character () has been moved. On the other hand, the memcpy() function is designed to work with any type of data. Because not all data ends with a null character, you must provide the memcpy() function with the number of bytes you want to copy from the source to the destination.<span
class="Apple-converted-space"> </span><br
/> </span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">41.<strong>How can I convert a string to a number?</strong></span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;"><br
/> The standard C library provides several functions for converting strings to numbers of all formats (integers, longs, floats, and so on) and vice versa.</span></span></p><p>The following functions can be used to convert strings to numbers:</p><p>Function Name Purpose</p><p>atof() Converts a string to a double-precision floating-point value.</p><p>atoi() Converts a string to an integer.</p><p>atol() Converts a string to a long integer.</p><p>strtod() Converts a string to a double-precision floating-point value and reports any “leftover” numbers that could not be converted.</p><p>strtol() Converts a string to a long integer and reports any “leftover” numbers that could not be converted.</p><p>strtoul() Converts a string to an unsigned long integer and reports any “leftover” numbers that could not be converted.</p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">41.<strong>How can I convert a number to a string?</strong></span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;"><br
/> The standard C library provides several functions for converting numbers of all formats (integers, longs, floats, and so on) to strings and vice versa The following functions can be used to convert integers to strings:</span></span></p><p>Function Name Purpose</p><p>itoa() Converts an integer value to a string.</p><p>ltoa() Converts a long integer value to a string.</p><p>ultoa() Converts an unsigned long integer value to a string.</p><p>The following functions can be used to convert floating-point values to strings:</p><p>Function Name Purpose</p><p>ecvt() Converts a double-precision floating-point value to a string without an embedded decimal point.</p><p>fcvt() Same as ecvt(), but forces the precision to a specified number of digits.</p><p>gcvt() Converts a double-precision floating-point value to a string with an embedded decimal point.</p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">42.<strong>Is it possible to execute code even after the program exits the main() function?<span
class="Apple-converted-space"> </span><br
/> </strong><br
/> The standard C library provides a function named atexit() that can be used to perform “cleanup” operations when your program terminates. You can set up a set of functions you want to perform automatically when your program exits by passing function pointers to the atexit() function.<span
class="Apple-converted-space"> </span><br
/> </span></span></p><p><strong><span
style="font-weight: 400;"><span
style="font-size: x-small;">What is the stack?</span></span></strong><span
style="font-weight: 400;"><span
style="font-size: x-small;"><span
class="Apple-converted-space"> </span><br
/> The stack is where all the functions’ local (auto) variables are created. The stack also contains some<br
/> information used to call and return from functions.</span></span></p><p>A “stack trace” is a list of which functions have been called, based on this information. When you start using a debugger, one of the first things you should learn is how to get a stack trace.</p><p>The stack is very inflexible about allocating memory; everything must be deallocated in exactly the reverse order it was allocated in. For implementing function calls, that is all that’s needed. Allocating memory off the stack is extremely efficient. One of the reasons C compilers generate such good code is their heavy use of a simple stack.</p><p>There used to be a C function that any programmer could use for allocating memory off the stack. The<br
/> memory was automatically deallocated when the calling function returned. This was a dangerous function to call; it’s not available anymore.<span
class="Apple-converted-space"> </span></p><p><strong><span
style="font-weight: 400;"><span
style="font-size: x-small;">How do you print an address?</span></span></strong><span
style="font-weight: 400;"><span
style="font-size: x-small;"><span
class="Apple-converted-space"> </span><br
/> The safest way is to use printf() (or fprintf() or sprintf()) with the %P specification. That prints a void<br
/> pointer (void*). Different compilers might print a pointer with different formats. Your compiler will pick<br
/> a format that’s right for your environment.</span></span></p><p>If you have some other kind of pointer (not a void*) and you want to be very safe, cast the pointer to a void*:<span
class="Apple-converted-space"> </span></p><p>printf( “%Pn”, (void*) buffer );<span
class="Apple-converted-space"> </span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">45.<strong>When should the register modifier be used? Does it really help?</strong></span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">The register modifier hints to the compiler that the variable will be heavily used and should be kept in the CPU’s registers, if possible, so that it can be accessed faster.<span
class="Apple-converted-space"> </span></span></span></p><p>There are several restrictions on the use of the register modifier.</p><p>First, the variable must be of a type that can be held in the CPU’s register. This usually means a single value of a size less than or equal to the size of an integer. Some machines have registers that can hold floating-point numbers as well.<span
class="Apple-converted-space"> </span></p><p>Second, because the variable might not be stored in memory, its address cannot be taken with the unary &amp; operator. An attempt to do so is flagged as an error by the compiler. Some additional rules affect how useful the register modifier is. Because the number of registers is limited, and because some registers can hold only certain types of data (such as pointers or floating-point numbers), the number and types of register modifiers that will actually have any effect are dependent on what machine the<br
/> program will run on. Any additional register modifiers are silently ignored by the compiler.</p><p>Also, in some cases, it might actually be slower to keep a variable in a register because that register<br
/> then becomes unavailable for other purposes or because the variable isn’t used enough to justify the overhead of loading and storing it.</p><p>So when should the register modifier be used? The answer is never, with most modern compilers. Early C compilers did not keep any variables in registers unless directed to do so, and the register modifier was a valuable addition to the language. C compiler design has advanced to the point, however, where the compiler will usually make better decisions than the programmer about which variables should be stored in registers.</p><p>In fact, many compilers actually ignore the register modifier, which is perfectly legal, because it is only a hint and not a directive.<span
class="Apple-converted-space"> </span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">46.<strong>Can a file other than a .h file be included with #include?</strong></span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">The preprocessor will include whatever file you specify in your #include statement. Therefore, if you have the line</span></span></p><p>#include &lt;macros.inc&gt;</p><p>in your program, the file macros.inc will be included in your precompiled program. It is, however, unusual programming practice to put any file that does not have a .h or .hpp extension in an #include statement.<span
class="Apple-converted-space"> </span></p><p>You should always put a .h extension on any of your C files you are going to include. This method makes it easier for you and others to identify which files are being used for preprocessing purposes. For instance, someone modifying or debugging your program might not know to look at the macros.inc file for macro definitions. That person might try in vain by searching all files with .h extensions and come up empty. If your file had been named macros.h, the search would have included the macros.h file, and the searcher would have been able to see what macros you defined in it.<span
class="Apple-converted-space"> </span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">47.<strong>What is Preprocessor?</strong></span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">The preprocessor is used to modify your program according to the preprocessor directives in your source code. Preprocessor directives (such as #define) give the preprocessor specific instructions on how to modify your source code. The preprocessor reads in all of your include files and the source code you are compiling and creates a preprocessed version of your source code. This preprocessed version has all of its macros and constant symbols replaced by their corresponding code and value assignments. If your source code contains any conditional preprocessor directives (such as #if), the preprocessor evaluates the condition and modifies your source code accordingly.</span></span></p><p>The preprocessor contains many features that are powerful to use, such as creating macros, performing conditional compilation, inserting predefined environment variables into your code, and turning compiler features on and off. For the professional programmer, in-depth knowledge of the features of the preprocessor can be one of the keys to creating fast, efficient programs.<span
class="Apple-converted-space"> </span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">48.<strong>How can you restore a redirected standard stream?</strong><span
class="Apple-converted-space"> </span><br
/> The preceding example showed how you can redirect a standard stream from within your program. But what if later in your program you wanted to restore the standard stream to its original state? By using the standard C library functions named dup() and fdopen(), you can restore a standard stream such as stdout to its original state.</span></span></p><p>The dup() function duplicates a file handle. You can use the dup() function to save the file handle<br
/> corresponding to the stdout standard stream. The fdopen() function opens a stream that has been<br
/> duplicated with the dup() function.</p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">53.<strong>What is the heap?</strong><span
class="Apple-converted-space"> </span><br
/> The heap is where malloc(), calloc(), and realloc() get memory.</span></span></p><p>Getting memory from the heap is much slower than getting it from the stack. On the other hand, the heap is much more flexible than the stack. Memory can be allocated at any time and deallocated in any order. Such memory isn’t deallocated automatically; you have to call free().</p><p>Recursive data structures are almost always implemented with memory from the heap. Strings often come from there too, especially strings that could be very long at runtime. If you can keep data in a local variable (and allocate it from the stack), your code will run faster than if you put the data on the heap. Sometimes you can use a better algorithm if you use the heap—faster, or more robust, or more flexible. It’s a tradeoff.</p><p>If memory is allocated from the heap, it’s available until the program ends. That’s great if you remember to deallocate it when you’re done. If you forget, it’s a problem. A “memory leak” is some allocated memory that’s no longer needed but isn’t deallocated. If you have a memory leak inside a loop, you can use up all the memory on the heap and not be able to get any more. (When that happens, the allocation functions return a null pointer.) In some environments, if a program doesn’t deallocate everything it allocated, memory stays unavailable even after the program ends.<span
class="Apple-converted-space"> </span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">54.<strong>How do you use a pointer to a function?</strong></span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">The hardest part about using a pointer-to-function is declaring it.</span></span></p><p>Consider an example. You want to create a pointer, pf, that points to the strcmp() function.</p><p>The strcmp() function is declared in this way:</p><p>int strcmp(const char *, const char * )</p><p>To set up pf to point to the strcmp() function, you want a declaration that looks just like the strcmp() function’s declaration, but that has *pf rather than strcmp:</p><p>int (*pf)( const char *, const char * );</p><p>After you’ve gotten the declaration of pf, you can #include &lt;string.h&gt; and assign the address of strcmp() to pf: pf = strcmp;<span
class="Apple-converted-space"> </span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">55.<strong>What is the purpose of realloc( )?</strong><span
class="Apple-converted-space"> </span><br
/> The function realloc(ptr,n) uses two arguments.the first argument ptr is a pointer to a block of memory for which the size is to be altered.The second argument n specifies the<br
/> new size.The size may be increased or decreased.If n is greater than the old size and if sufficient space is not available subsequent to the old region, the function realloc( )<br
/> may create a new region and all the old data are moved to the new region.<span
class="Apple-converted-space"> </span><br
/> </span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;">56.<strong>What is the purpose of main( ) function?</strong></span></span></p><p><span
style="font-weight: 400;"><span
style="font-size: x-small;"><br
/> The function main( ) invokes other functions within it.It is the first function to be called when the program starts execution.</span></span></p><p>- It is the starting function</p><p>- It returns an int value to the environment that called the program</p><p>- Recursive call is allowed for main( ) also.</p><p>- It is a user-defined function</p><p>- Program execution ends when the closing brace of the function main( ) is reached.</p><p>- It has two arguments 1)argument count and 2) argument vector (represents strings passed).</p><p>- Any user-defined name can also be used as parameters for main( ) instead of argc and argv</p><p>* more <a
href="planetetutors.com">here</a></td></tr></tbody></table> ]]></content:encoded> <wfw:commentRss>http://www.freequestionbank.com/question/c-interview-questions/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>IIT Papers &#8211; Chemistry</title><link>http://www.freequestionbank.com/question/iit-papers-chemistry/</link> <comments>http://www.freequestionbank.com/question/iit-papers-chemistry/#comments</comments> <pubDate>Wed, 25 Mar 2009 07:47:42 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Exam]]></category> <category><![CDATA[IIT]]></category> <category><![CDATA[Question]]></category> <category><![CDATA[chemistry]]></category> <category><![CDATA[paper]]></category><guid
isPermaLink="false">http://www.freequestionbank.com/?p=410</guid> <description><![CDATA[]]></description> <content:encoded><![CDATA[]]></content:encoded> <wfw:commentRss>http://www.freequestionbank.com/question/iit-papers-chemistry/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>IIT Papers &#8211; Physics</title><link>http://www.freequestionbank.com/question/iit-papers-physics/</link> <comments>http://www.freequestionbank.com/question/iit-papers-physics/#comments</comments> <pubDate>Wed, 25 Mar 2009 07:42:56 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Exam]]></category> <category><![CDATA[IIT]]></category> <category><![CDATA[Question]]></category> <category><![CDATA[paper]]></category> <category><![CDATA[physics]]></category><guid
isPermaLink="false">http://www.freequestionbank.com/?p=408</guid> <description><![CDATA[]]></description> <content:encoded><![CDATA[]]></content:encoded> <wfw:commentRss>http://www.freequestionbank.com/question/iit-papers-physics/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>IIT Papers &#8211; MATHEMATICS</title><link>http://www.freequestionbank.com/question/exam/iit/iit-papers-mathematics/</link> <comments>http://www.freequestionbank.com/question/exam/iit/iit-papers-mathematics/#comments</comments> <pubDate>Wed, 25 Mar 2009 07:35:13 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[IIT]]></category> <category><![CDATA[Exam]]></category> <category><![CDATA[MATHEMATICS]]></category> <category><![CDATA[paper]]></category> <category><![CDATA[Question]]></category><guid
isPermaLink="false">http://www.freequestionbank.com/?p=404</guid> <description><![CDATA[]]></description> <content:encoded><![CDATA[]]></content:encoded> <wfw:commentRss>http://www.freequestionbank.com/question/exam/iit/iit-papers-mathematics/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- This site's performance optimized by W3 Total Cache. Dramatically improve the speed and reliability of your blog!

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)
Database Caching 6/13 queries in 0.580 seconds using disk

Served from: p3slh049.shr.phx3.secureserver.net @ 2010-09-07 19:55:20 -->