q~stio~ bank .. s pro ramm:n .•° batcb-b.te~h firstnotes2u.com/notes/ccp question bank.pdfwrite a...

9
... •· Q~STIO~ BANK .. r puc ' t . . • .. ' · RtS-f 01 ' Subiect: Computer S ste .. and Pro ramm:n . •° C 11 Year and Batcb-B.te~h first yearfBll"t~~21 ; . ., ,,,,., SECTION-A {Short type questions) 1. How binary file differ from text file? 2. List five internal and external commands used in DOS operating sy 5t em. 3. Wliat do you mean by operator precedence and associativity? 4. Write difference between implicit and explicit type casting. S. Justify that OS is a resource management. 6. C~~cribe the functionalities of an OS. 7. Di! ~ Ierentiat'? between calloc O and mnlloc O function in C. 8. Discuss the various functionalities of compiler, linker and loader. 9. What is pointer variable? Explain the difference between *p+-:- anJ ++*μ , 10. What are kernel and shell? 11. What is pointer arithmetic? 12. Give any four format sr,ecifiers used in printf(J function. 13. Give difference between Android and Windows OS. 14. List various types of entry and exit control loop in C lnni,ange with syntax. 15. Write purpose and syntax of at least two iterP.tive stntcment in C. 16 .. What is an OS? List the various types of OS. 17. Write Short notes on- Break and Contir.ue. 18. Explain sizeo!() operatpr with examr,!e. 19. Explain dot(.) and arrow(->) ope.:ator in C with ex~mple. 20. If a=4 and b=7, give the value of expression- a&b and a"b. ,

Upload: vuongtruc

Post on 26-Mar-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

...

•· Q~STIO~ BANK ..

r puc ' t . . • .. • ' ·RtS-f 01 ' Subiect: Computer S ste .. and Pro ramm:n .•° C

11

Year and Batcb-B.te~h first yearfBll"t~~21 ; . ., ,,,,.,

SECTION-A {Short type questions)

1. How binary file differ from text file?

2. List five internal and external commands used in DOS operating sy5tem.

3. Wliat do you mean by operator precedence and associativity?

4. Write difference between implicit and explicit type casting.

S. Justify that OS is a resource management.

6. C~~cribe the functionalities of an OS.

7. Di!~Ierentiat'? between calloc O and mnlloc O function in C.

8. Discuss the various functionalities of compiler, linker and loader.

9. What is pointer variable? Explain the difference between *p+-:- anJ ++*µ ,

10. What are kernel and shell?

11. What is pointer arithmetic?

12. Give any four format sr,ecifiers used in printf(J function.

13. Give difference between Android and Windows OS.

14. List various types of entry and exit control loop in C lnni,ange with syntax.

15. Write purpose and syntax of at least two iterP.tive stntcment in C.

16 .. What is an OS? List the various types of OS.

17. Write Short notes on- Break and Contir.ue.

18. Explain sizeo!() operatpr with examr,!e.

19. Explain dot(.) and arrow(->) ope.:ator in C with ex~mple.

20. If a=4 and b=7, give the value of expression- a&b and a"b.

,

SECTION-B an~ SECTION-C (long type gu~SdonU

" t t" to another 1. Write a program in C to copy the content of given file say a. X

file"b.txt" . .2. Explain cnlJ by value and call by reference mechanism for function call using proper

example.

J . Deflne structure. Create a suitable structure for storing the information ~bout the

Technical Institutions in India (assume appropriate attributes to store information).

List all the institutes for a given state.

4. De.,crfbe various storage classes supported ln C, with suitable exr.mp!e.

S. Explain the term array. Write a C program to find the multiplication and transpose

of two matrices of order 3by3.

6. What are the types of function? Write a C program to. find the factorial of a given

number using recursion.

7. Write a function in C that finds the reverse of a given integer number.

8. What is an operating system? Give name of any four operating systems and write

main <iiff erence between them.

9. Write a C program to check whether a given number is prime or not between 1 to

100.

10. W1·lte AC program to print nth Fibonacci series.

11. Explain the various data types b C. Discuss primitive data types in terms of

memory size, format pecifier and raage.

12. What a1 e preprocessor directives? Explain all different types of preprocessor

directives.

13. What do you understand by pointer a~ithmetic? Explain. What _are the advantages . and disadvantages of using pointer variable? •

14. Write a short note on the dynamic memory allocation C. How it is done and

different from static memory allocation? Explain with suitable example.

15. W~at are the various types of files that can. be created in C language? Also give

different modes in which these files can be used with proper syntax. ·Write-.a C

program to append some more ~ext at the end of an existed file. \ ~

-16:""\Vha_t is pr()gramming approach? Write a short notes on top-d9Wn and flottom-uP

..,. program development approach.

17 ·E 1

• • · 0 . the utility ot bit wis,~ • xp am vanous bit wise operators in C language. IScuss ·

operators with some e~a~ple.

18. Write a C program to sum of the following series.

S=l /1 3+ l/-V2+ 1/33+ l/-V4 .....•.......... 10 term.

19. Write a C program that returns the maximum and minimum element of given

matrix of size 3X3.

20. Write a program in C to generate a following structure or p attern:

• ""*

***** •••••••

•••**"'*** ····~·· ••••• ••• '\

*

/ QUESTION BANK

Subject: Computer System and Programming in C (RCS-lOl_l

Year and Batch-B. tech first year(Bl 1 +B12}

SECT ION-A (Short type questions)

1. How binary file differ fro m text file?

2. List five internal and external commands used in DOS operating system.

3. What do you mean by operator precedence and associativity?

4. Write difference between implicit a nd explicit type casting.

5. Justify that OS is a resource m a n agem ent.

6. Describe the functiona lit ies of a n O S.

7. Differentiate between calloc O a nd ma lloc () function in C.

8. Disc uss the various func tiona lities of compiler, linker a nd loader.

9. What is pointer varia ble? Ex pla in t he difference between *p++ and ++*p.

10·. What a r e ke rnel a nd shell?

11. What is poi nter arith metic?

12. G ive any fotE' fo:-;n~t spe.::ifi~r:; used in p r intf() function.

13. Give difference between Android and Windows OS.

14. L ist vario us types of entry and exit control loop in C language wit h syntax.

15. W r ite p ur pose and syntax of a t least two iterative statem en ts in C.

16. W h a t is an OS? List the various types of OS.

17. W r ite Short notes on- Break a nd Continue.

18. Ex plai n sizeof() operator wi th example.

19. Explain dot (. ) and arrow(->) operator in C with exam ple.

20. If a=4 and b=7, give the value of expression- a&b and a "b.

21. Expla in the basic structure of C program .

22. Differentiate between structure and union .

23. What is application software? Give any two examples of application softwa re.

24. List any four input and output d evices in computer system.

25. What are enumerated data types? Explain.

26. What is the difference between while and do-while staten1ents in

language?

27. How plotter is different from printer?

28. What are the classifications of computer? Explain any two in detail.

29. Explain logical and bit operators with example.

30. If a=5, b=6; then find the value of expression ++a&amp;b++.

31. Make the hierarchy of different memories available in a computer.

32. Write difference between complier and interpreter.

33. Write briefly about the user defined fu nct ions and standard library functions.

34. What is error'! Brief its type.

35. ·Write Difference between primary and secondary m emor y.

36. What will be t he output of the following program?

void main()

{

int n1i..l0;

pi·intf("'Vod % <.I ¾ d" ,++m,m,m++ ):

}

37. What is void pointer? Ho;,.v it is d ;ffr rcnt from other pointers?

38. List any fou r examples of secondary storage devices.

39. Define CP U. Explain its major components.

40. If a=8 and b=9 then find the value of expression: (++a-b++)/a--.

41. Differentiate between RAM and ROM ?

42. Differentiate high level and low (machine) level language.

r SECTION-B and SECTIO N-C (long type guestionU

1. Write a pro r . " t" to another

file" b. txt". g am In C to copy the content of given file say a.tx

2. Explain 11 b· f t' n call using ca Y value and call by reference mechanism for unc 10

proper example.

3· Define structu r e. Create a suitable structure for storing the information

about the Technica l Institutions in India (assume appropriate attributes to

store information). List all the institutes fo r a given sta te.

4. Describe vario us storage classes supported in C, with su itable example.

5. Explain the term array. Write a C program to find the multiplication 8nd

transpose of two matrices of order 3by3.

6. Wha t a re the types of function ? Write a C program to find the factorial of a

given number using recursion.

7. Write a functio n in C that finds the reverse of a given integer number.

8. W hat is an opera ting system? Give name of any four operating systems a nd

w rite m ain diffe rence between them.

9. \Vrik n C progr~ m t 0 check wh_eth er 2 given number is prime or not between

l to I 00. • th F'b . . 10. Wri :e a C program to prrnt n I onacc1 senes.

11. Explain the various data types in C. Discuss primitive data types in t erms of

memory size, format specifie r a nd r a nge.

12. Wha t are preprocessor d irectives? Explain all different types of preprocessor

directives.

13. What do you understand by pointer arithmetic? Explain. What are the

advantages and disadvantages of using pointer variable?

14. Write a short note on the dynamic memory allocation C . How it is done and

different fro m static memory alloca tion? Explain with suitable example.

15. What are th e va rious types of fi les that can be created in C language? Also

give different modes in which these files can be used with proper syntax.

Write a C program to append some more text at the end of an existed file.

. roa"l1'' \\'rite a short notes on top .. cJowu ~ 16. What is programnung app .... ·

bottom-up program development a1>proach. . · h tT · of bit

17. Explain various bit wise operators in C language. Discuss t e u I

ity

wise operators with aiome example.

18. Write a C program to sum of the following series.

S=l/13+1/'V2+1/33+1/--v'4 .. . .. .... . .. .... 10 term. 19. Wrfte a C progrant that returns the maximum and minimum element of

given matrix of size 3XJ.

20. Write a program in C to generate a following structure or rn1ttern:

21. Draw the functionul block diugrntt1 of a Digital Computer und discus~ its

comrrnn,u1ts itt briof.

(i) (1011010'1.0111) 2 IQ('!) I{)

01) c3142,2s) ,o i\1 en 1

(ill) (110101010,0101} 2; (?) 10

(iv) 2•s complemt.,nt of 11110010.

(v) (AC1.2DB) 10 "' (?) u

(vi) (324.12) s;;; ('!) 10

(vii) (16'1.45) 10 • ('I) 16

(viii) (Al.BC) 16 • (?) 2

(Ix) (231.23) 4 =-(?)"

(X) {111010,J l 1) z= (?) 11

23. Define dructu1·e. Write u progrum in C to find the record of n student ha, ing

aneximum marks from the list of 10 records. Each record has roll no, name,

and marks ff elds.

What is the diff . C '? Describe the erence between break and continue ID

structure of swi h . tc -case with meat example.

25- Explain th · h t to find e various symbols used in flow charts. Draw the flow c ar

whether the . given number is palindrome or not.

26. Define se h ' h arc mg. Write a C program to implement a linear searc ·

27· What are characteristics of an algorithm? Write an algorithm to find the sum

of all the numbers divisible by 3 between 11 and 50. 28· Define the term software and hardware. Br iefly explain system software and

application software with at least one example of each. 29- What do you mean by sorting? Write a C program to sort an array of integer

into ascending order.

30. What are the different types of operator in C language and also write down

the difference between the associativity and precedence of operators.

31. W hat do you mean by strings? State some library functions for st ring

manipu lation . Also create a function to find the length of the string.

32. Write short notes on :

(i) Scope of va riables

error

(iii) Associability and precedence

approach.

(v) Algorithm and flowchart

(ii) Logical error and run time

(iv) Top-down and bottorn-u p

(vi) High level and low level language

33. What is math function? Explain any five math function.

34. Write short notes on various approaches to problem solving with suitable

examples.

35. Differentiate between the nested .... if and the switch statements in C language

with suita ble example.

36. Write a C program to check w hether a given string is a palindrome or not?

Also give the total nu mber of characters in the string.

37. W hat do you mean by macros? Illust rate the d efine and calling of macros

with suitable example.

38. Write a function in C that returns the sum of all the odd digits of a ~i"'t·,1 ,

positive integer. \ I

39. Write the function to concatenate two strings without using the library ,

function.

40. Write a C program to sum of the following series.

S==l/l!+l/2!+1/3!+1/4! ................ 10 term.

43. Write a function in C language to find the GCD(greatest common divisor) of

two numbers.

44. Write a C prograrn to swap two numbers using dummy(third) variable.

~