Skip to main content

Competitive Programming Part-1

 Competitive Programming


Time: 3 hours Max. Marks: 70 

Note: 1. Question paper consists of two parts (Part-A and Part-B)

 2. Answering the question in Part-A is Compulsory 

 3. Answer any THREE Questions from Part-B


PART –A 

1. a) How to compile and execute a C program in Unix environment? (4M)

 b) Differentiate between break and exit statements. (4M) 

 c) What is the importance of # include? Explain. (3M) 

 d) How to access individual characters of a string using pointers? Illustrate. (4M) 

e) Give the uses of typedef statement. (4M)

f) Give various modes of operating a file. (3M)

PART –B

2. a) What is flow chart? How it is useful in writing the programs? Explain about 

different symbols in flow chart. 

(8M) 

b) Is there any difference between the pre-decrement and post decrement operators? 

Explain with suitable examples. 

(8M)

3. a) What is the need of the iterations and selection? Explain each of the statements 

with examples. 

(8M)

 b) Write a C Program to find the length of a string without using built-in function. (8M)

4. a) How to access array elements? Explain. (8M)

b) Write a C program to find the average of n numbers using functions. (8M)

5. a) Write a program to find whether the given number is strong number or not by 

using command line arguments. 

(8M)

 b) How pointers are used to declare single and multi-dimension arrays with 

examples? 

(8M)

6. a) Compare enumeration data type with unions. (8M)

b) What is structure? Explain array of structures with example. (8M)

7. a) Explain about the functions for reading and writing data from a file. (8M)

 b) Write a C program to print file contents in reverse order. (8M)


Comments

Popular posts from this blog

What is HTML or HTML tags

HTML 1) HTML stands for Hyper Text Markup Language 2) Created by Ten Berners-Lie in 1991 but published in 1995 3) It is Client side web technology. 4) It has predefined elements are called tags, used to"markup" a text documents. HTML TAGS 1 <html>_____</html>     Declare the Web page to be written in HTML. 2 <head>_____</head>       Delimits the pages head. 3 <title>______</title>       Defines the title.(not display on the page) 4 <body>_____</body>      Delimits the pages body. 4 <hn>_____</hn>      Delimits a level in heading. 5 <b>_____</b>      Set in boldface 6 <i>_____</i>       Set in italics. 7 <center>_____</center>      Center on the page horizontal. 8 <ul>_____</ul>     ...

Dalton's Atomic Theory—(Chemistry)

Dalton's Atomic Theory The theory that' all matter is made up of very tiny indivisible particles (atoms)' is called atomic theory of matter. Dalton's put forward his Atomic Theory of matter in 1808. The various postulates of Dalton's atoAto Theory of matter are as follows: All the matter is made up of very small particles called 'atoms'. Atoms cannot be divided. Atoms can neither be created nor destroyed Atoms are of various kinds. There are as many kinds of atoms as are elements. All the atoms of a given element are identical in every respect, having the same mass, size and chemical properties. Atoms of different elements differ in mass, size and chemical properties. Chemical combination between two elements consists in the joining together of atoms of these elements to form molecules of compounds. Drawbacks of Dalton's Atomic Theory It is now known that some of the statements of Dalton's Atomic Theory of matter are not exactly corre...

Operator Overloading // In Hindi or English // C++TUTORIAL

  Operator Overloading आज हम जानेंगे Operator overloading क्या होता है:― Operator Overloading — Operator हमेशा program के datatype के साथ काम करता है। जैसे int, float, char लेकिन जब हम अपना datatype अलग से बनाते हैं, तो इसे ही हम Operator Overloading कहते हैं।       ये user define data type पे काम करता है।अथवा ये हमारे basic data type पे work करता है। In English― T he way operators work for user-defined types like objects and structures. This is known as operator overloading. For example, Suppose we have created three objects c1 , c2 and result from a class named Complex. अगर आपको ये post अच्छी लगी हो तो हमे comment कर के जरूर बताएं।