0% found this document useful (0 votes)
14K views46 pages

Sep I Sem Bca General Question Bank

1st year BCA 1st semester question bank
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14K views46 pages

Sep I Sem Bca General Question Bank

1st year BCA 1st semester question bank
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

MANGALORE UNIVERSITY

State Education Policy – 2024


[SEP-2024]

QUESTION BANK

FOR

I SEMESTER BCA
GENERAL
Question Bank

FUNDAMENTALS OF COMPUTERS
UNIT I
Questions carrying 2 Marks

1. What is Computer?
2. What do you meanby generations of Computers?
3. Expand UNIVAC, ENIAC, EDVAC, EDSAC, BIOS, EPROM (1 Mark Each)
4. Define Artificial Intelligence.
5. List different technologies related to AI.
6. What is an Expert System?
7. What is parallel processing?
8. What is a Microcomputer?
9. What is a Supercomputer?
10.List out sub systems of CPU.
11.What are Registers?
12.What is a Bus?
13.What is System Bus? Name its functional groups
14.What is the main memory? Name two types.
15.Differential RAM and ROM.
16.What is Cache memory?
17.What are input devices? Give Example.
18.What are pointing devices? Give example.
19.What is Trackball? Why it is used?
20.What is Joystick? Mention its use.
21.What are output devices? List different forms of output devices.
22.What is a hard copy? What is a soft copy?
23.Write different purposes of the light pen.
24.What is a plotter? List different types of plotters.
25.Define resolution and refresh rate of monitors.
26.What is Control unit?
27.Differentiate Program counter and Instruction Register.
28.What is speech Recognition.
29.What is scanner?Mention its types.
30.What is Dot Pitch and Refresh Rate.
31.What is Raster Scan Display.
32.What is Random Sacn Display.
33.What is Beam Penetration.
34.What is Shadow Masking.
35.What is Plasma Display.
36.What is Drum Plotter.
37.What is Flatbed Plotter.
38.Differentiate Laser and Inkjet Printer.
39.What is Dot-Matrix Printer.
40.What is Color Depth.
3-6 marks questions
1. List and explain characteristics of Computers. (6)
2. List and explain in brief the characteristics of First-Generation Computers. (6)
3. List and explain in brief the characteristics of Second-Generation Computers. (6)
4. List and explain in brief the characteristics of Third-Generation Computers. (6)
5. List and explain in brief the characteristics of Fourth-Generation Computers. (6)
6. List and explain in brief the characteristics of Fifth-Generation Computers. (6)
7. Explain different types of Microcomputers. (6)
8. Write a note on
a. Mainframes b. Supercomputers. (6)
9. Draw the block diagram of a Computer System and explain the components of a Computer
System. (6)
10.List and explain the applications of Computers in different fields (6)
11.List out any four registers available in CPUalong withits function. (4)
12.Explain System Bus and its functional groups. (6)
13.Briefly explain any two pointing devices. (5)
14.Write a note on
a. Keyboard (3)
b. Touch Screen (3)
c. Trackpad (3)
d. Digital Camera (3)
e. Flatbed Scanners (4)
f. Dot Matrix Printers (3)
g. Laser Printer (3)
15.Write a note on Ink-jet printers. (4)
16.Write a note on Plotters. (4)
17.Differentiate LCD and CRT monitors (5)
18.With neat Diagram Explain Cathode Ray Tube Monitors.
19.Explain Displaying Graphics on a CRT.
20.Explain Liquid Crystal Display Monitors.
UNIT II
Questions carrying 2 Marks
1. Define Software.
2. Define System Software. Give example.
3. Define Application Software. Give example.
4. Define Utility Software? List any two System Utility functions.
5. Differentiate compilers and interpreters.
6. What is Machine Language?
7. What is Assembly Language?
8. What is Loader?
9. List basic tasks of a loader.
10.Define Algorithm.
11.Define flowcharts.
12.List any 4 symbols used in flow charts along with their purpose.
13.What is pseudocode?
14.List any two limitations of pseudocode.
15.What is Word Processor? Give example for Word Processors.
16.What is Spreadsheet Software? Give example for Spreadsheet Software.
17.What are image editors? Give example.
18.What is Database Management System? Give example for Database Management System.
19.What is Presentation Software? Give example for Presentation Software.
20.What is Desktop Publishing? Give example for Desktop Publishing Software.
21.What is Device Drivers.
22.What is Disk Management and Disk Cleanup.
23.What is Language Translators.
24.What is Operating System. Mention any two its Basic Functions.
25.What are the Disadvantages of Machine Languages.
26.What is Assembler.
27.Differentiate Absolute Loader and Relocating Loader.
28.Mention Any Four Advantages of High-level Languages.
29.Mention Any Four Featurs of Good Programming Language.
30.What is Linker. Differentiate Linker and Loader.
3-6 Marks Questions
1. Define Operating System. List and explain basic functions of an Operating System (6)
2. Write a note on
a. Device Drivers b. Language Translators (6)
3. What is System Utility? Explain any five functions of System Utility (6)
4. What is Application Software? Explain any two commonly used application software. (6)
5. List and explain functions of System Utilities. (6)
6. Write a note on
a. Word Processors (3)
b. Image Editors (3)
c. Presentation Software (3)
d. Desktop Publishing Software (3)
7. What are assemblers? List and explain different functions of Assemblers. (6)
8. List and explain the disadvantages machine level languages? (4)
9. List and explain the advantages high level languages? (6)
10.Briefly explain different phases of the Program Development Cycle (6)
11.Discuss flowcharts. List and explain the benefits of flowcharts (6)
12.Write an algorithm to display maximum of three numbers (4)
13.Write an algorithm to calculate the factorial of a number (4)
14.Discuss flowcharts. List and explain the limitations of flowcharts (6)
15.Discuss pseudocode. List and explain the advantages and limitations of pseudocode (6)
16.Explain the purpose of Pseudocode. List and explain keywords commonly used in pseudocode
(6)
17.Briefly explain general problem-solving strategies followed in problem solving aspects.(6)
18.List and Explain Features of Good Programming Language.
19.List and explain the disadvantages Assembly level languages?
20.Explain Fourth Generation Languages.

UNIT III

2 Marks Questions
1. Convert (153.513)8 to Binary
2. (BCA)16=()2=()10
3. Obtain the 1’s and 2’s Complements of the following binary numbers
a. 1010101
b. 000001

4. Obtain the 9’s and 10’s Complements of the following decimal numbers
a. 678
b. 896
5. Obtain the 9’s and 10’s Complements of the following decimal numbers
a. 341.23
b. 0.234
6. Obtain the 1’s and 2’s Complements of the following binary numbers
a. 1110.101
b. 101.001
7. Obtain the 9’s and 10’s Complements of the following decimal numbers
a. 1234
b. 7890
8. Convert (76.20)8 to binary and decimal.
9. Convert (11011011)2 to octal and Hexa decimal.
10.Convert (345)10 to octal and Hexa decimal.
11.Write Excess-3 and binary equivalent of (45)10
12.Write BCD and binary equivalent of (45)10
13.Write BCD and 2421 code of (345)10

14.Write BCD and 84-2-1 code of (98)10


15.Write BCD and binary equivalent of (98)10
16.Write 2421 and 84-2-1 code of (78)10

17.Write 5043210 code of (78)10


18.State any two postulates of Boolean algebra.
19.State De-Morgan’s theorems.
20.Define Venn diagram.
21.Define truth table and logic gate.
22.What is BCD code? Give an example.
23.What is Excess-3 code? Give an example.
24.What is 2421 code? Give an example.
25.What is meant by RADIX of the number system?
26.Obtain the 9’s and 10’s Complements of the following decimal numbers
a. 9870
b. 0078
27.What is meant by self complementary propriety?
28.Differentiate 1’s and 2’s complement.
29.What is Parity Bit?
30. Perform (100101.11)2 + (11011.101)2
31.Perform (1011101.11)2 - (11011.101)2
32. Perform (1000011)2 + (1101101)2
33.Perform (101110111)2 - (11011101)2
34.Convert the following Octal Numbers to Binary and Hexadecimal:
i) 154 ii) 631 iii) 465 iv) 25.12 v) 153.513

35.. Convert the following Hexadecimal Numbers to Binary and Octal:


i) (AB2)16 ii) (98D)16 iii) (FACE)16, iv)(38.5)16 v) (3F.A2)16

36.Convert the following Binary Numbers to Octal and Hexadecimal:


i) 1010100(2) ii) 101011 (2) iii) 110110010(2) iv) 1011110.10101(2) v)
1111110.1111(2)

37.4. Write the BCD and Excess-3 Codes for the following Decimal Numbers:
i) 74 ii) 257 iii) 3243 iv) 83.5 v) 234.12

38. Write BCD and 2421 code of the following:


i) 345 ii) 146 iii) 987 iv) 25.4 v) 87.03
39.BCD and 84-2-1 code of the following :
i) 98 ii) 74 iii) 57 iv) 63.5 v) 38.2

40.. Write 2421 and 84-2-1 code of the following :


i)78 ii) 94 iii) 53 iv) 83.65 v) 29.4

41.. Write 9’s and 10’s Complement of the following numbers


i) 5243 ii) 8126 iii) 8749 iv) 8790.123 v) 4567.326

42.9. Write 1’s and 2’s Complement of the following numbers


i. (1110101)2 ii) (101001)2 iii) (11001100)2 iv) (111010.1011)2 v)
(10101011.1001)2

43. (100101.11)2 + (11011.101)2


44.(1011101.11)2 - (11011.101)2
45.(1000011)2 + (1101101)2
46.(101110111)2 - (11011101)2
47.(1101)2-(11011)2

4, 5 and 6 Marks Questions


1. Perform following conversion.
i. (1101.11)2=( )10
ii. (37)8=()16
iii. (45)10=()2
2. Convert (225.222)10=()2=()8=()16
3. Perform following conversion.
i. (111101.10)2=()8
ii. (45.B3)16=()2
iii. (789)10=()2
4. Perform following Subtraction using 9’s and 10’s complement methods.
i. (8052)10-(3250)10
ii. (6320)10-(8659)10
5. Perform following Subtraction using 1’s and 2’s complement methods.
i. (1001)2-(1011)2
ii. (10011)2-(1001)2
6. Perform following Subtraction using 9’s and 10’s complement methods.
i. (6408)10-(543)10
ii. (272)10-(354)10
7. Perform following Subtraction using 1’s and 2’s complement methods.
i. (10101)2-(1011)2
ii. (10110)2-(11010)2
8. State the Postulates of Boolean algebra.
9. State and Prove De-Morgan’s theorems for two variable.
10.State and Prove any three theorems of Boolean algebra.
11.Perform following Subtraction using 9;s and 10’s complement methods.
i. (341.45)10-(325.04)10
ii. (632.02)10-(865.78)10
12.Perform following Subtraction using 1’s and 2’s complement methods.
i. (100.01)2-(101.11)2
ii. (1001.10)2-(100.11)2
13.State and Prove De-Morgan’s theorems for THREE variable.
14.Perform following conversion.
i. (BCD.A1)16=( )10
ii. (201)8=()2
iii. (451)10=()8
15.Perform following Subtraction using 9’s and 10’s complement methods.
i. (1234)10-(743)10
ii. (3456)10-(5678)10
16.Write a note on Venn Diagram.
17.Using Venn diagram prove that X=XY+X.
18.Using Venn diagram prove that A.(BC)=(AB).C
19.Using Venn diagram prove that A+(B+C)=(A+B)+C
20.Perform following conversion.
i. (152.A1)16=( )10
ii. (345)8=()2
iii. (915)10=()8
21. Write the procedure to perform r’s complement subtraction with example.
22.Write the procedure to perform (r-1)’s complement subtraction with example.

UNIT-II
2 marks questions

1. Write truth table and logic expression of NOR gate


2. Prove that ABC+A’B+ABC’=B
3. Prove that X+X=X
4. Prove that X.X=X
5. Draw the logic circuit for F(X,Y,Z)=X’Y+X’Z
6. How to write the complement of a Boolean function? Also write the complement of
F(X,Y,Z)=X’YZ’+X’Y’Z
7. What are minterm and maxterm?
8. Write the complement of F(W,X,Y,Z)=X’YZ’+X’Y’Z+W’XY
9. What do you mean by duality of Boolean algebra? Give some example.
10. Draw the symbol of NAND gate and write the truth table for NOR gate
11. Prove (A+B)(A+C)=A+BC
12. Define sum of Product term and product of sum term with example to each.
13. Write the truth table and logic diagram of XNOR gate
14. Prove x + x’ y = x + y
15. Write the truth table and logic diagram of XOR gate
16. What is the difference between Canonical and standard form?

17. What is meant by principle of duality? Write the dual of the given expression
F=(X+Y)(X+Y’)(X+Y+Z)

18. Write the truth table of OR gate and draw the logical diagram
19. Write the truth table and logic diagram of OR gate
20. What are Universal Gates?
21. Draw the logic circuit for F(X,Y,Z)=XY+X’Z’ using basic gate.
22. Draw the logic circuit for F(X,Y,Z)=(X+Y)’ using basic gate.
23. Define Sum term and Product term.
24. Write the general structure of 2 variables K-Map.
25. Write the general structure of 3 variables K-Map
26. Write the general structure of 4 variables K-Map
27. Define Pair,QUAD,OCTET in K-Map

28. Write the truth able of NOT gate and Buffer.

29. Write the truth table of AND gate and draw the logical diagram.
30. Write the truth table and logic expression of NAND gate

31. Write the dual of the given expression F=(X+Y)(X+Y’+Z)


32. Write the truth table and logic expression of XOR gate
33. Write the truth table and logic expression of XNOR gate

34. What are Don’t care term.

35. What is meant by Non-standard form? Give a example.

36. What is meant by Standard form? Give a example

37. What is meant by Canonical form? Give a example

4, 5 and 6 Marks Questions


1. Express the Boolean function F=XY’+X’Z as sum of minterm and product of maxterm
2. Express the Boolean function F=WXY’+X’Y’Z as sum of minterm and product of
maxterm
3. Using theorems and Postulates simplify
F(A,B,C,D)=A’B(D’+C’D)+B(A+A’CD)
4. Using Boolean Theorems and postulates ,prove the following:
i) x + x’y=x + y
ii) x’y’z + x’yz + xy’=x’z + xy’
5. Implement Boolean function F=x’y’z + x’yz + yz’ with basic gate and also write the
truth table.
6. How do you get complement of a function? Find the complement of
F1=x’yz’ + x’y’z
F2=x(y’z’ + yz)
7. Write the Sum of Minterm and Product of Maxterm for given expression.
F(X,Y,Z)=XY+X’Z
8. Write the truth table and the logical diagram of NOT, OR, AND and XOR gates.
9. Implement the following Boolean function using gates and also write the truth table.
i) F= xyz’
ii) F= xy’+ x’z
10. What are minterms and maxterms? Explain with example.
11. What are NAND and NOR gates? Explain their functionality with logic diagram and
truth table.
12. Prove that NAND is universal gate.
13. Prove that NOR is universal gate.
14. Express the Boolean function F(A,B,C)=A+B’C as sum of minterm and product of
maxterm
15. Using K-Map simplify the following expression
F(a,b,c,d)= ∑(0,1,2,4,5,6,8,9,12,13,14)
16. Obtain the simplified expression in product of sums using Karnaugh map.
F(x,y,z)=π(0,1,4,5)
17. Using K-Map simplify the following expression
F(a,b,c,d)= ∑(0,1,4,8,9,10)
18. Minimize F(A,B,C,D)=∑(0,3,4,7,8)+ ∑d(10,11,12,13,14,15) and draw the logic
diagram for minimized expression.
19. Using K-Map simplify the following expression
F(a,b,c)= ∑(0,2,4,5,6)
20. Obtain the simplified expression in product of sums using Karnaugh map.
F(w,x,y,z)=π(0,1,4,5,7,10,14,15)
21. Using K-Map simplify the following expression
F(w,x,y,z)= ∑(4,5,6,8,9,12,13,14)
22. Write a note on K-Map. Using K-Map simplify the following expression F(w,x,y,z)=
∑(1,2,4,5,6,8,9,12,13,14,15)
23. Minimize F(A,B,C,D)=∑(0,2,,4,6,8,10,12,14) and draw the logic diagram for
minimized expression.

24. Using K-Map Minimize F(A,B,C)=AB’+BC’


25. Using K-Map Minimize F(A,B,C,D)=ABC’+BC’+BCD
26. Using K-Map simplify the following expression
F(w,x,y,z)= ∑(8,9,10,11,12,13,14)
Solve the following using K-Maps and draw the logic diagram for minimized expression.
i) F(A,B,C)= Σ(1,3,6,7) ii) F(A,B,C) = Σ(0, 2, 4, 6 )
iii) F (A,B,C) = Σ (0, 1, 2, 4, 5, 6 ) iv) F (A, B, C, D) =Σ (0,1,4,8,9,10)
v) F(P,Q,R,S)=Σ(0,2,5,7,8,10,13,15)
vi) F(A, B, C, D) = Σ(3, 4, 5, 7, 9, 13, 14, 15)
vii) F(W, X, Y, Z) = Σ(1, 3, 4, 6, 9, 11, 12, 14)
viii) F(w,x,y,z)= Σ(4,5,6,8,9,12,13,14)
ix) F(w,x,y,z)= Σ(8,9,10,11,12,13,14)
x) F(A, B, C, D) = Σ(0, 1, 2, 5, 7, 8, 9, 10, 13, 15)
xi) F (A, B, C, D) =Σ (0,1,3,4, 5,7,12, 13, 15)

Simplify the following using K-map and draw the logic Diagram for the simplified expression:
i) F(A, B, C) = Σ(1, 2, 5, 7) + Σ(0, 4, 6)
ii) F(A, B, C) = Σ(0, 1, 6, 7) + Σ(3, 4, 5)
iii) F(A, B, C, D) = Σ(1, 3, 4, 6, 8, 9, 11, 13, 15) + Σd(0, 2, 14)
PROGRAMMING IN C
UNIT –I
2MARKS
1) List any two important features of C
2) What are tokens? Give any two examples.
3) Give the structure of C program.
4) List steps involved in executing a C program
5) What are keywords? List any four keywords.
6) What are identifiers? Give example for a valid and invalid identifier name.
7) Differentiate keywords and identifiers.
8) List the rules to be followed for naming an identifier/variable.
9) What are constants? Give examples for integer constants.
10) Differentiate constants and variables.
11) Differentiate integer and real constants. Give example
12) Differentiate character and string constants.
13) List and specify the meaning of any four backslash character constants.
14) Provide the syntax for declaring a variable. Give an example.
15) What is initialization? Give an example.
16) What do you mean by symbolic constants? How to define them?
17) Provide the syntax of printf(). Give an example.
18) Provide the syntax of scanf(). Give an example.
19) List any four unformatted I/O functions available in C
20) List with use any four format codes used with scanf()/printf()
21) Specify the value of x after evaluating following
expression x=3+4-7*8/5%10;
22) Specify the value of x after evaluating following
expression
float x =1.5;
y=3
x=y/2+y*8/y-y+x/3;

23) Specify the value of x after evaluating following expression


int y=3, z=4, x;
float t=4.2;
x=z*z/y+y/2*t+2+t;
24) Describe the limitations of using getchar( ) and scanf( ) functions for reading strings.
25) Provide the syntax of putchar(). Give an example
26) How do you read a floating point number in a program? Give example.
27) What happens when an input data item contains:
a. More characters than the specified field width
b. Fewer characters than the specified field width
28) Why do we need to use comments in programs?
29) What are trigraph characters? Give example
30) What is an ‘Backslash Character Constants’? Give example
4 TO 6 marks Questions
1) List and explain features of C [6].
2) Give Structure of C program and Explain each section. [6].
3) Explain structure of C program with programming example [6]
4) Write a note on Tokens in ‘C’ [6].
5) Write a note on Constants in ‘C’ [6].
6) Explain in brief classification of of a) integer types and b) floating point types
7) List and explain primary data types available in ‘C’ [6].
8) Explain with examples declaring, initializing and assigning value to variable [6].
9) Explain with example #define statement in ‘C. List rules apply to it. [6].
10) Explain with example reading ,writing a character and strings in C [6]
11) Explain with example formatted Input in C [6].
12) Explain with example formatted Output in C [6]
13) Explain printf() function with its syntax and example [6]
14) Explain scanf() function with its syntax and example [6]
15) Write a program to read two real values and perform addition,
subtraction, multiplication and division operation on them [6].
16) Explain getchar() function with its syntax and example [6]
17) Explain putchar() function with its syntax and example [6]
18) Explain Inputting Integer Numbers With an Example.[5]
19) Explain With an example commonly used printf Format codes[6]
20) What is a string constant? How do string constant differ from character constant?
UNIT – II
2MARKS

1) What are operators? Specify their use.


2) List different categories of operators available in C
3) What is integer arithmetic? Give an example.
4) What is real arithmetic? Give an example
5) What is relational expression? Give an example
6) What is logical expression? Give an example
7) Differentiate pre/post increment and decrement operators
8) List short-hand assignment operators available in C
9) What is the difference between = and == operators?
10) Give the syntax of conditional operator. Give an example.
11) List special operators available in C along with their meaning
12) Define arithmetic expression. Give an example.
13) Specify the precedence of arithmetic operators in C
14) What do you mean by type conversion? Mention its types.
15) List any four built-in Mathematical functions available in C
16) Write the syntax of simple if statement. Give an example.
17) Give the syntax of goto statement. Give an example
18) Define the term looping. What are the different looping statements available in C?
19) Differentiate entry-controlled and exit-controlled loops
20) Differentiate break and continue statements
21) What is comma Operator.Give an example
22) What is sizeOf Operator.Give an example
23) List out the Rules for ++ and – Operators.
24) What is Mixed-mode Arithmetic? Give an example.
25) List out the Rules for Evaluation of Expression.
26) Differentiate Implicit and Explicit Type Conversion.
4 to 6 marks questions

1) List and explain arithmetic, logical and relational operators available in C (6)
2) List and explain a) conditional operator, b) short-hand assignment and c)
increment & decrement operators available in C (6)
3) Write a note on bitwise operators available in C (6)
4) Explain with example evaluation of arithmetic expression in C (6)
5) Explain precedence of arithmetic operators with the help of an example expression
(6)
6) Explain the concept of type conversion in C, Give examples (6)
7) Explain in brief implicit and explicit type conversion with example (6).
8) Explain different forms of if statement (6)
9) Explain nested if statement with the help of a program example (6)
10) Explain else..if ladder with the help of a program example (6)
11) Explain switch statement with syntax and a program example [6]
12) Explain while statement with syntax and example (6)
13) Explain do..while statement with syntax and example (6)
14) Explain for statement with syntax and example (6)
15) Explain the following: (6)
i. Nested loops
ii. Infinite loops
16) Explain the following mathematical function
a) floor() b) ceil() c)sqrt( ) d) abs( ) e) pow( ) f)log( )
17) What is meant by looping? Briefly describe the different forms of looping?
18) Explain ‘continue’ and ‘break’ statement with syntax and example.
19) Distinguish between
a. break and goto
b. continue and goto
20) Evaluate the following C expressions.[6]

Assume int i=10,j=8;


float x=0.004, y=-0.01;
char c= ‘c’ ,d=’d’;

a) (3 * i - 2 *j) % (2*d-c) b) (x>y) && ( i>0) && (j<5)


c) 5 * ( i + j ) > ‘c’ d) i= 2*c / d
e) y = ( i>j) ? x+c :y+d f) i-= (c>d) ? –d : -c

Unit-III
2Marks
1) What is an array? List its types.
2) List any four advantages of arrays.
3) Differentiate one-dimensional and two-dimensional arrays
4) Write a statement that declares an integer array of 10 element size and
initializes it with values.
5) How to initialize a one-dimensional array in C. Give an example.
6) How to initialize a two-dimensional array in C. Give an example.
7) What is a string? How to declare a variable to hold string value in C?
8) What is the difference between reading string value using scanf(“%s”)
and gets() functions?
9) List any four-string handling functions available in C
10) List any four-character handling functions.
11) How to declare and initialize string variable?
12) What are the possible values that the function strcmp( ) can return?
What do they mean?
13) How to initialize a string array in C. Give an example.
14) Mention suitable string functions to do the following:
1. To find length of the string
2. To copy one string to another string
3. To add two strings
4. To reverse given string
15) What is the purpose of the following functions: Explain with syntax and example.
a) isalnum( ) b) isalpha( ) c) isupper( )
d)toupper( )
16) What is the purpose of the following functions: Explain with syntax and example.
i. a) strcat( ) b) strrev( )
ii. e) strcpy( ) f) strlen( )
17) What do you mean by an array of strings?
18) What are the different categories of functions?
19) What are library functions? Name any two library functions supported by C language
20) What is a function prototype? Give one reason when a function prototype is not
necessary
21) How a recursive function is different from an ordinary function?
22) What are actual and formal parameters?
23) List any two advantages of using functions?
24) Give the syntax used for declaring a function in C
25) Give the syntax used for defining a function in C
26) What are the actual and formal arguments?
27) How function returns value? Give example.
28) Differentiate function declaration and function definition.
29) List different categories of functions available in C
30) Give syntax and example of calling a function C.
31) What do you mean by nesting of functions? Give example.
32) What is a recursive function?
33) Write recursive function to calculate factorial of a given number.

4 to 6 marks questions
1) Explain one-dimensional array with the help of suitable code example [6].
2) Explain two-dimensional array with the help of suitable code example [6].
3) Explain the different ways available for the initialization of string variable [6].
4) Write a program to sort elements of an integer array [6].
5) Write a program to search for an element in an integer array [6].
6) Explain with example how to declare, initialize and use strings in C [6].
7) List and explain any five-string handling functions available in C [6]
8) List and explain any five-character handling functions available in C [6]
9) Explain with the help of a code example declaring, defining and calling a function in C
[6]
10) Explain with example function with no arguments and no return values [6]
11) Explain with example function with arguments and no return value [6]
12) Explain with example function with no arguments but a return value [6]
13) Explain with example functions with arguments and a return value [6)]
14) Write a note on a) nesting of functions b) recursive functions [6]
15) Differentiate:
a. automatic and static variables
b. formal and actual parameters
c. local and global variables
d. scope and visibility of variables
16) Explain any four character manipulating functions in C with syntax and example.
17) What are the different methods of inputting strings? Give examples.
18) What are the different methods of outputting strings? Give examples.
19) What is the purpose of the following functions: Explain with syntax and example.
a) isalnum( ) b) isdigit( )
c) isalpha( ) d) isupper( )
e) toupper( ) f) tolower( )
g) islower( ) h) isspace( )
20) Explain Elements of user defined functions with example.
UNIT – IV
2 Marks Question
1) What is pointer? Specify its use.
2) List any four advantages of pointers
3) Specify how to declare a pointer variable and initialization of it?
4) List any four rules to be followed when performing operations on pointer variable
5) What do you mean by scale factor in pointer increment?
6) List any two advantages of using functions?
7) Give the syntax used for declaring a function in C
8) Give the syntax used for defining a function in C
9) What are the actual and formal arguments?
10) How function returns value ? Give example.
11) Differentiate function declaration and function definition.
12) List different categories of functions available in C
13) Give syntax and example of calling a function C.
14) What do you mean by nesting of functions? Give example.
15) What is a recursive function?
16) Write recursive function to calculate factorial of a given number.
17) What is structure? Why it is required?
18) Give the general format used for defining a structure
19) Give the general format used for defining a union
20) How to Access individual members of structure? Give example.
21) What is union? How it is declared?
22) How does an append mode differ from a write mode?
23) What is a file? Name any two file processing activities.
23) How is a file declared?
How a file can be closed?
24)
Explain any 4 file related functions used in C.
25)
What are the different modes of opening a file in C?
26)
When a program is terminated, all the files used by it are automatically closed? Why
27)
is it then necessary to close a file during execution of the program?
28) List any four preprocessor directives.
29) What is Macro Substitution? Give example.
4 to 6 marks questions

1) Explain with example defining a structure, declaring structure variable and


accessing structure members [6].
2) What is a pointer variable? How is it declared, initialized and used in a program?
3) Distinguish between”
a. #define and #include
b. #include <filename> and #include “file name”
c. #ifdef and #ifndef
d. Macro call and function call [6]
4) Illustrate the use of pointers with arrays [6]
5) What do you mean by pointer arithmetic? Explain how it is differed
from other integer arithmetic [6]
6) Explain how pointers are used to access string? [6]
7) Explain with example defining a Union, declaring union variable and accessing union
members
8) Write a note on pointers increments and scale factor[6]
9) What is a file? Explain any four types of file access modes.
10) Explain the following file handling functions in ‘C’ with syntax.
(i) getc( ) (ii) putc( ) (iii) fclose( ) (iv) fprintf( ) (v) getw( ) (vi) putw( )
11) What is the purpose of the following functions.
a. feof( ) b. ferror( )
c. fopen( ) (d.) fscanf( )
12) Explain any 4 file related functions used in C.
13) What is the primary advantage of using a data file?
14) Write a note on INPUT/OUTPUT operation on files.
15) Differentiate the following:
i. fscanf( ) and scanf( )
ii. getc( ) and getw( )
iii. putw( ) and getw( )
16) Write macros to:
(i) Find the sum of a, b and c
(ii) Find maximum of x and y
(iii) Find product of e, f and g
(iv) Find maximum of x , y and z
17) What are the different modes of opening a file in C. Explain any four file modes.
18) Explain the concept of passing pointer variable as function argument.
19) What is structure? How does a structure differ from an array?.
20) Explain with example how a structure is defined and used in a program.
Discrete Mathematics for Computer Applications
Unit -I
2 marks questions
1. What are logical statements? Give example.
2. Express the following compound statements in words taking p for hard work, q for
success and r for job.
i) ‫ ך‬p^‫ ך‬q ii) ‫(ך‬p˅q)^r
3. Construct the truth tables for
i) ‫( ך‬p˅q) ii) ‫( ך‬p^q)
4. Write which of these is a tautology or a fallacy.
i) p˅‫ ך‬p ii) p ^‫ ך‬p
5. Express the statement through appropriate
symbols: It is not raining still it is pleasant.
6. Define a set. Give an example.
7. Define null set and universal set.
8. Define proper subset. Give example.
9. Define disjoint sets. Give example.
10. Define subset. Give example.
11. Represent
a. A∪B b. A∩B c. A-B d. B-A e. ‫ ך‬A using Venn
diagram
12. Define power set. Give example.
13. Write the power set of A={1,2}
14. A={1,2,6,7} B={2,3,4,6,7} what is A+B?
15. A={1,2,3} B={1, 2,5,7,9} write A-B
16. A={1,2,3} B={1, 2,5,7,9}, find A+B.
17. A={2,3,4} B={1,2} and c={4, 5,6} what is (A+B )+(B+C)
18. Define Cartesian product of two sets.
19. A={a,b} B={1,2,3} write AxB and BXA.
20. Define symmetric relation and give an example.
21. Define reflexive relation. Give an example.
22. Define transitive relation. Give an example.
23. Write the power set of A={1,2,3}
24. What are equivalence relations? Give an example.
25. A={2,4,6,7,9} B={1,2,4,7,8} Find A-B and A+B.
26. A={1,2,3} B={a,b} write AXB and BXA
Questions Carrying 4 or more marks.

1. Write which of these is a tautology or a fallacy with the help of truth table.
i) p˅ ‫(ך‬p˄q) ii) (p˄q)˄ ‫(ך‬p˄q)
2. Using truth table, show that (p˄q) => p and p => (p˅q) are both tautologies, where p
and q are any two statements.
3. Write the following statements in symbolic form and give their negations.
i) If he works hard, he will pass the examination.
ii) If it rains, he will not go for a walk.
4. Prove by means of truth table that, (p˄q) => (p˅q) is a tautology but (p˅q) => (p˄q) is
not.
5. With the help of truth table, prove that p => (q˄r) ≡ (p=>q) ˄ (p=>r)
6. Prove by means of truth table that, p q = (p→ q) ˄ (q→ p)
7. Show the following implications:
i. (p˄q) => (p→q)
ii. p => (q→p)
8. Show the following equivalences:
i. p→(q→p)  ‫ך‬p→ (p→q)
ii. p →(q˅r)  (p→q) ˅(p→r)
9. Prove by means of truth table that, ‫(ך‬p→q) = p˄‫ ך‬q
10. A={1,2,3} B={1,2,5,7,9} Write A-B, B-A, A+B, A∪B, A∩B.
11. A={1} B={a,b} C={2,3} write AXB, BXA, A2, B2, A2XB B2XA, AXBXC, C2XA
12. A={x/ x is an integer and 0 ≤ 𝑥 ≤ 5 }, B={3,4,5,17} and C={1,2,3} Find
i. A∪B ii. A∩B iii. A-B iv. A-C iv. A∩C
13. A={α, β } and B={1, 2, 3} Find A2, B2, A2 X B, A X B and B X A
14. A={3,4,5,17} B={1,2,3} C={x/X is an integer and 0 ≤ 𝑥 ≤ 5} write
A∪B, A∪C, B∪C, B-C, A-C, B∩C.
15. Let X = {1,2,3,4} and R = {(x,y) | x>y} Draw the graph of R and give its matrix.
16. R={<1,1> <1,2>, <1,4>, <2,1>, <2,2>, <2,3>, <3,2>, <3,3>, <4,2>, <4,4>} Construct
relation matrix of R and draw digraph of R
17. R={(1,1), (1,2), (1,4), (2,1), (2,2), (2,3), (3,2), (3,3), (4,2), (4,4)} Construct relation
matrix of R and draw digraph of R
18. Let X={1,2,3,….,7} and R={<x,y>|x-y is divisible by 3}, Show that R is an equivalence
relation.
19. Let X={ball,bed,dog,let,egg} & R={<x,y>|x,y∈X ∧ xRyis x and y contain some common
letter}. Prove that R is a compatibility relation
20. R={(1,2), (3,4), (2, 2)} S={(4,2), (2,5), (3,1), (1,3)} Write R ⃘ S, R ⃘ R , S ⃘ S, S ⃘R and R
⃘(S ⃘R)
21. Let X={1,2,3,….,7} and R={<x,y>|x-y is divisible by 3}, Draw the graph of the relation.
22. . Given the relation matrices
Unit-II

Questions carrying 2 marks


1. Define partial order relation. Give an example
2. What is lexicographic ordering?
3. Define surjective function. Give an example.
4. Define injective function. Give an example.
5. Define bijective function. Give an example.
6. Define inverse function. Give an example.
7. Define domain of a function. Give an example
8. Define range of a function, with an example.
9. Let x={1,5,p,Jack}, Y={2,5,7,q,Jill} and f={<1,2>,<5,7>,<p,q>,<Jack,q>}, Find Df and Rf
10. Define product rule.
11. There are 32 microcomputers in a computer center. Each microcomputer has 24 ports.
How many different ports to a microcomputer in the center are there?
12. A new company with just two employees, Sanchez and Patel, rents a floor of a building
with 12 offices. How many ways are there to assign different offices to these two
employees?
13. The chairs of an auditorium are to be labeled with an uppercase English letter
followed by a positive integer not exceeding 100. What is the largest number of
chairs that can be labelled differently?
14. How many different bit strings of length seven are there?
15. Define the sum rule.
16. A student can choose a computer project from one of three lists. The three lists contain
23, 15, and 19 possible projects, respectively. No project is on more than one list. How
many possible projects are there to choose from?
17. Define the subtraction rule.
18. What is Pigeonhole principle? Give an example.
19. How many students must be in a class to guarantee that at least two students receive
the same score on the final exam, if the exam is graded on a scale from 0 to 100
points?
20. In how many ways can we select three students from a group of five students to
stand in line for a photo session?
21. An office building contains 27 floors and has 37 offices on each floor. How many
offices are in the building?
22. Write the formula to calculate P(n,r).
23. Write the formula to calculate C(n,r).

24. How many ways are there to select five players from a 10-member tennis team
to make a trip to a match at another college?
25. Let S = {1, 2, 3, 4, 5}. List all the 3-permutations of S.
26. Let S = {1, 2, 3, 4, 5}. List all the 3-combinations of S.
Questions Carrying 4 or more marks.
1. Draw the Hasse diagram of the set A, under the partial ordering relation “divides”
and indicate those which are totally ordered.
A = {1,2,3,6,12}
2. Let X = {2,3,6,12,24,36} and the relation <= be such that x ≤ y, if x divides y. Draw
the Hasse diagram of (X, ≤)
3. Let f(x)=x+2, g(x)=x-2 and h(x)=3x for x∈R, R is a set of real numbers. Find
f ⃘ g, f ⃘ f, g ⃘ g, g ⃘ f and f ⃘(h ⃘g)
4. Define Surjective, injective and Bijective functions with example.
5. Let x={1,2,3} f, g, h and s are the functions from X to X given by
f={(1,2), (2,3),(3,1)} h={(1,1), (2,2), (3,1)}
g={(1,2), (2,1) , (3,3)} s={(1,1), (2,2), (3,3)} Find f ⃘ g, g ⃘ f, s ⃘ s,
f ⃘ h ⃘ g, s ⃘ g and f ⃘ s

6. Draw the Hasse diagram of the set A, under the partial ordering relation “divides”
and indicate those which are totally ordered.
A = {1,2,3,6,12}
7. Let X = {2,3,6,12,24,36} and the relation <= be such that x ≤ y, if x divides y. Draw
the Hasse diagram of (X, ≤)
8. Let f(x)=x+2, g(x)=x-2 and h(x)=3x for x∈R, R is a set of real numbers. Find
f ⃘ g, f ⃘ f, g ⃘ g, g ⃘ f and f ⃘(h ⃘g)
9. Define Surjective, injective and Bijective functions with example.
10. Let x={1,2,3} f, g, h and s are the functions from X to X given by
f={(1,2), (2,3),(3,1)} h={(1,1), (2,2), (3,1)}
g={(1,2), (2,1) , (3,3)} s={(1,1), (2,2), (3,3)} Find f ⃘ g, g ⃘ f, s ⃘ s,
f ⃘ h ⃘ g, s ⃘ g and f ⃘ s
1

11. Show that functions f(x)=x3 and g(x)=𝑥 3 for x𝜀 R are inverse of one another.
12. How many different license plates can be made if each plate contains a sequence of
three uppercase English letters followed by three digits (and no sequences of letters are
prohibited, even if they are obscene)?
13. Draw the Hasse diagram of the set A, under the partial ordering relation “divides”
and indicate those which are totally ordered.
A = {1,2,3,6,12}
14. Let X = {2,3,6,12,24,36} and the relation <= be such that x ≤ y, if x divides y. Draw
the Hasse diagram of (X, ≤)
15. Let f(x)=x+2, g(x)=x-2 and h(x)=3x for x∈R, R is a set of real numbers. Find
f ⃘ g, f ⃘ f, g ⃘ g, g ⃘ f and f ⃘(h ⃘g)
16. Define Surjective, injective and Bijective functions with example.
17. Let x={1,2,3} f, g, h and s are the functions from X to X given by
f={(1,2), (2,3),(3,1)} h={(1,1), (2,2), (3,1)}
g={(1,2), (2,1) , (3,3)} s={(1,1), (2,2), (3,3)} Find f ⃘ g, g ⃘ f, s ⃘ s,
f ⃘ h ⃘ g, s ⃘ g and f ⃘ s
1

18. Show that functions f(x)=x3 and g(x)=𝑥 3 for x𝜀 R are inverse of one another.
19. How many different license plates can be made if each plate contains a sequence of
three uppercase English letters followed by three digits (and no sequences of letters are
prohibited, even if they are obscene)?

20. Suppose that either a member of the mathematics faculty or a student who is a
mathematics major is chosen as a representative to a university committee. How many
different choices are there for this representative if there are 37 members of the
mathematics faculty and 83 mathematics majors and no one is both a faculty member
and a student?
21. How many bit strings of length eight either start with a 1 bit or end with the two bits
00?
22. A computer company receives 350 applications from computer graduates for a job
planning a line of new Web servers. Suppose that 220 of these applicants majored in
computer science, 147 majored in business, and 51 majored both in computer science
and in business. How many of these applicants majored neither in computer science nor
in business?
23. There are 18 mathematics majors and 325 computer science majors at a college. In how
many ways can two representatives be picked so that one is a mathematics major and
the other is a computer science major?
24. How many ways are there to select a first-prize winner, a second-prize winner, and a
third-prize winner from 100 different people who have entered a contest?
25. A group of 30 people have been trained as astronauts to go on the first mission to Mars.
How many ways are there to select a crew of six people to go on this mission (assuming
that all crew members have the same job)?
26. A multiple-choice test contains 10 questions. There are four possible answers for each
question. A) In how many ways can a student answer the questions on the test if the
student answers every question? B) In how many ways can a student answer the
questions on the test if the student can leave answers blank?
27. Let S = {1, 2, 3, 4, 5}. List all the 3-permutations and 3-combinations of S.
Unit-III
Questions carrying 2 marks

1. Define the terms : experiment, sample space, event.


2. An urn contains four blue balls and five red balls. What is the probability that a ball
chosen at random from the urn is blue?
3. What is the probability that when two dice are rolled, the sum of the numbers on
the two dice is 7?
4. Define Laplace’s definition of probability.
5. What is probability distribution?
6. What probabilities should we assign to the outcomes H (heads) and T (tails) when
a fair coin is flipped?
7. Define conditional probability.
8. Define independent events.
9. What is a random variable?
10. Define Bayes’ theorem.
11. Write the formula to calculate expected value.
12. What is variance?
13. Determine whether 3 | 7 and whether 3 | 12.
14. What are the quotient and remainder when 101 is divided by 11?
15. Determine whether 17 is congruent to 5 modulo 6 and whether 24 and 14 are
congruent modulo 6.
16. Define prime and composite number.
17. Define GCD and LCM.
18. What is the greatest common divisor of 24 and 36?
19. Find the prime factorization of 641 and 100
20. Find the prime factorization of 1024
21. Find the prime factorization of 999
22. What is the greatest common divisor of 17 and 22?
23. What is the least common multiple of 233572 and 2433?
24. What is the least common multiple of 17, 1717?
25. What is the gcd of 17, 1717?
26. What is Euclidean algorithm?
27. State mathematical induction?
28. What do you mean by strong induction?

Questions Carrying 4 or more marks.


1. There are many lotteries now that award enormous prizes to people who correctly
choose as set of six numbers out of the first n positive integers, where n is usually
between 30 and 60. What is the probability that a person picks the correct six numbers
out of 40?
2. Find the probability that a hand of five cards in poker contains four cards of one kind.
3. What is the probability that a poker hand contains a full house, that is, three of one
kind and two of another kind?
4. A sequence of 10 bits is randomly generated. What is the probability that at least
one of these bits is 0?
5. What is the probability that a positive integer selected at random from the set of
positive integers not exceeding 100 is divisible by either 2 or 5?
6. Suppose that a die is biased (or loaded) so that 3 appears twice as often as each other
number but that the other five outcomes are equally likely. What is the probability that
an odd number appears when we roll this die?
7. A bit string of length four is generated at random so that each of the 16 bit strings of
length four is equally likely. What is the probability that it contains at least two
consecutive 0s, given that its first bit is a 0? (We assume that 0 bits and 1 bits are equally
likely.)
8. What is the conditional probability that a family with two children has two boys, given
they have at least one boy?
9. Suppose E is the event that a randomly generated bit string of length four begins with
a 1 and F is the event that this bit string contains an even number of 1s. Are E and F
independent, if the 16 bit strings of length four are equally likely?
10. Are the events E, that a family with two children has two boys, and F, that a family with
two children has at least one boy, independent?
11. Are the events E, that a family with three children has children of both sexes, and F,
that this family has at most one boy, independent? Assume that the eight ways a family
can have three children are equally likely.
12. Suppose that we have found that the word “Rolex” occurs in 250 of 2000 messages
known to be spam and in 5 of 1000 messages known not to be spam. Estimate the
probability that an incoming message containing the word “Rolex” is spam, assuming
that it is equally likely that an incoming message is spam or not spam. If our threshold
for rejecting a message as spam is 0.9, will we reject such messages?
13. Suppose that we train a Bayesian spam filter on a set of 2000 spam messages and 1000
messages that are not spam. The word “stock” appears in 400 spam messages and 60
messages that are not spam, and the word “undervalued” appears in 200 spam
messages and 25 messages that are not spam. Estimate the probability that an
incoming message containing both the words “stock” and “undervalued” is spam,
assuming that we have no prior knowledge about whether it is spam. Will we reject
such messages as spam when we set the threshold at 0.9?
14. Let X be the number that comes up when a fair die is rolled. What is the expected value
of X?
15. A fair coin is flipped three times. Let S be the sample space of the eight possible
outcomes, and let X be the random variable that assigns to an outcome the number of
heads in this outcome. What is the expected value of X? (6 marks)
16. What is the expected value of the sum of the numbers that appear when a pair of fair
dice is rolled? (6 marks)
17. Are the random variables X1 and X2 independent, if the sum of the numbers that appear
when a pair of fair dice is rolled? (6 marks)
18. Let X and Y be random variables that count the number of heads and the number of
tails when a coin is flipped twice. Are the random variables X and Y independent? (6
marks)
19. What is the variance of the random variable X, where X is the number that comes up
when a fair die is rolled? (6 marks)
20. What is the variance of the random variable X((I, j )) = 2i, where I is the number
appearing on the first die and j is the number appearing on the second die, when two
fair dice are rolled? (6 marks)
21. What are the quotient and remainder when −11 is divided by 3?
22. Use the definition of addition and multiplication in Zm to find 7 +11 9 and 7 ・11 9.
23. Find the prime factorization of 7007.
24. Find the greatest common divisor of 414 and 662 using the Euclidean algorithm
25. Find the greatest common divisor of 91 and 287 using the Euclidean algorithm
26. Show that if n is a positive integer, then 1 + 2+· · ·+n = 𝑛 (𝑛 +1)
2
27. Use mathematical induction to prove the inequality n < 2n for all positive integers n.
28. Use mathematical induction to prove that 2n < n! for every integer n with n ≥ 4.
Unit-IV
Questions carrying 2 marks
1. Define graph, simple graph, multigraph, pseudograph, simple directed graph,
mixed graph, loop, multi-edges with an example? (Ask any one)
2. Define degree of a vertex, with an example?
3. Define multiplicity of an edge with an example?
4. What are neighbours of a node? Give an example?
5. What are initial and terminal nodes? Give an example?
6. Define isolated and pendant nodes with an example.
7. State hand shaking theorem.
8. How many edges are there in a graph with 10 vertices each of degree six?
9. Define a complete graph with an example.
10. Define a noncomplete graph with an example.
11. Define cycle and wheel with an example.
12. Find G1 ∪ G2 for the following graph

13. Find the number of vertices, the number of edges, and the degree of each vertex in
the given undirected graph.

14. Find isolated and pendant node in the graph

15. When do you say the graphs are isomorphic? Give an example.
16. Define an adjacency matrix.
17. Define an incidence matrix.
18. Define connected graph with an example.
19. Define disconnected graph with an example.
20. Define strongly and weakly connected graph.
21. What is a Euler circuit? Give an example
22. Define Euler path with an example.
23. Define a Hamilton path. Give an example
24. Define the chromatic number of a graph
25. What is meant by colouring a graph?
26. Find the chromatic number of the given graph

27. Find the chromatic number of the given graph

28. Define tree. Give an example


29. Define binary tree with example.
30. What is a (a) terminal node (b) degree of the node
31. What is a a) forest b) level of a node
32. Define root node and leaf node.
33. What is an ordered tree? Give an example
34. What is a binary tree? Give an example
35. What is meant by ordered set? Give example using the notation.
36. How does Russell’s Paradox challenge the foundation of set theory?
37. What is a phrase structure grammar?
38. Provide an example of a finite state language.
39. How is a NFA different from DFA?
40. Can a DFA and an NFA be equivalent? Justify your answer with a brief explanation.
41. Design an NFA to accept the set of strings over the alphabet set {0,1} and ending with
two consecutive zeros.
42. Design a Turing machine to recognize all strings consisting of even number of a’s.
43. Why is non-computability significant in real-world problem-solving?
44. Explain the role of finite state machines (FSMs) in user interface design. How can
they manage user input?
45. What are the practical implications of having a non-computable problem in
softwaredevelopment? Provide an example.
46. How can a finite automaton be utilized in input validation for a form
submission?Give a simple example.
47. Define the term "language recognition" in the context of software applications.
Whyis it important?
48. Describe a real-world application where Turing machines can be used for data
processing.
49. Why is the Turing Machine considered a stronger computational model than a
finitestate machine?
Questions Carrying 4 or more marks.
1. What are the degrees and neighbourhood of the vertices in graph displayed?

2. What are the degrees and neighbourhood of the vertices in graph displayed?

3. Find the in-degree and out degree of each vertex in the graph G with directed edges
as shown in the figure?

4. Find the union of the given pair of simple graphs.

5. Find the union of the given pair of simple graphs.

6. Write adjacency list and adjacency matrix to describe the simple graph given in the
figure (6 marks)
7. Represent the directed graph shown in the figure by listing all the vertices that are
the terminal vertices of edges starting at each vertex of the graph.

8. Use an adjacency matrix to represent to represent the graph

9. Use an adjacency list to represent the given graph.

10. Use an adjacency list to represent the given graph.

11. Draw a graph with the adjacency matrix

12. Draw a graph with the given adjacency matrix.


13. Represent the graph in with an adjacency matrix

14. Represent the given graph with an adjacency matrix.

15. Represent the given graph using an adjacency matrix.

16. Use an adjacency matrix to represent the pseudograph

17. Represent the graph shown in the figure with an incidence matrix

18. Represent the pseudograph shown in the figure using an incidence matrix.

19. Show that the graphs G = (V , E) and H = (W, F ), displayed in the given figure, are
isomorphic.
20. Are the graphs shown in the figure G1 and G2 connected? Verify

21. Does each of these lists of vertices form a path in the following graph? Which paths
are simple? Which are circuits? What are the lengths of those that are paths?
(a) a, e, b, c, b (b) a, e, a, d, b, c, a
(c) e, b, a, d, b, e (d) c, b, d, a, e, c
22. Are the directed graphs G and H shown in Figure strongly connected? Are they
weakly connected?

23. Which of the undirected graphs in Figure have an Euler circuit? Of those that do
not, which have an Euler path? (any one figure)

24. Which of the directed graphs in Figure have an Euler circuit? Of those that do
not, which have an Euler path? (any one figure)

25. Which of the simple graphs in Figure have a Hamilton circuit or, if not, a Hamilton
path? (any one figure)

26. What are the chromatic numbers of the graph G and H in the figure?

27. Construct the dual graph for the given map


28. Construct the dual graph for the given map.

29. Construct the dual graph for the map. Then find the number of colors needed to
color the map so that no two adjacent regions have the same color.

15. Construct the dual graph for the map. Then find the number of colors needed to
color the map so that no two adjacent regions have the same color.

16. Find the chromatic number of the given graphs.

16. How do you convert a directed tree into a binary tree? Explain with a diagram.
17. Convert the following trees into a binary tree.

1 7

2 3 8 9 10

4 5 6 11 12 13

18. Convert the following tree into a binary tree


1

2 3 4 5

6 7 8 9 10 11 12

19. Convert the following tree into a binary


tree 1

2 3 4 5

6 7 8 9 10 11

20. Discuss the significance of Russell’s Paradox in the context of set theory and logic.
21. How is an ordered pair different from set of two objects?
22. Define and provide an example of an ordered set. Explain how it differs
from anunordered set.
23. Give the formal definition of language. Give some languages over the alphabet
A, ifA = {a, b, c}.
24. Grammar for the language L needs to be constructed. If L = {aaaa, aabb, bbaa,
bbbb} and T = {a, b}, give the set of productions, when set of non-terminals N is
(i) N = {S}and (ii) N = {S, A}.
25. Give a real-world example, where finite automata can be used.
26. Describe the basic concept of a finite state machine with an example.
27. Illustrate with an example how finite state machines can be used as
languagerecognizers.
28. Provide an example of two FSMs that are equivalent and explain the reasoning
behindtheir equivalence.
29. Differentiate between Type-0 and Type-3 grammars, with examples.
30. Give the state diagram of the finite state automata of a device that compares
two binary numbers to determine whether they are equal, or which of the
two is larger.Consider the input alphabet as {00, 01, 10, 11} and output
alphabet as {EQUAL, LARGER, SMALLER}.
31. Design an NFA that accepts strings over the alphabet {0,1} that end with three
consecutive zeros, contain at least one occurrence of the substring 10, and
have aneven number of 1s. Provide a state diagram and provide examples of
accepted andrejected strings.
32. Design a simple NFA that recognizes passwords consisting of at least one digit
andone letter. Describe how the NFA functions.
33. Explain the importance of language hierarchies (e.g., Chomsky
hierarchy) indesigning compilers and interpreters.
34. Consider the language L = {anbn | n ≥ 1}, where strings consist of equal numbers
of'a's followed by 'b's. Explain a multi-phase approach that ensures you can
verify thisbalance without backtracking or using additional storage. How would
the system know when to stop reading 'a's and start reading 'b's?
35. Represent the following finite state machine diagrammatically, with the
help ofdirected graph.

36. What is a Turing machine.


37. Compare the computational power of Finite State Machines (FSM) and
Turing Machines. Why can FSMs not solve certain problems that Turing
Machines can?
38. Why is it impossible for Type-2 grammars (context-free grammars) to
generate alllanguages recognized by a Turing Machine?
39. Design a Turing machine M to recognize the language {0n1n2n | n ≥ 1}.
40. Explain how finite state machines can model physical systems with an example.
41. A phrase structure grammar can be used to specify a language. It consists of
fouritems, denoted by T, N, P and S. Explain, what does these mean.
42. Explain the concept of finite state languages and how they are connected to
Type-3grammars. Provide relevant examples.
43. Give the grammar for the language, L = {x | x ∈ {a, b}*, the number of a’s in x
is amultiple of 3}.
44. Construct the grammar for the language L = {aibi | i,j ≥ 1, i ≠ j}.
45. Given a finite state machine with 5 states, prove or disprove that it can
recognize thelanguage L = {anbn ∣ n ≥ 0}.
46. Show that the language L = {akbk ∣ k ≥ 1} is not a finite state language.
47. Show that the language L = {ak ∣ k = i2, i ≥ 1} is not a finite state language.
48. For the grammar in following figure, construct a finite state machine that
accepts thesentences in the language specified by the grammar as follows:
a. Let {0, 1}, the set of terminals, be the set of input letters.
b. Let there be a state corresponding to each nonterminal, with the state
corresponding to the starting symbol being the state. Let there be
additionalstate, accepting state (E), and trapping state (T).
c. For a production of the form Np → iqNk , there is a transition state from state Np
to state Nk when the input is iq. For a production of the form Np → iq, there is a
transition from state Np to the accepting state E when the input is iq. In absence
of productions of these form for state Np and input iq, there is a transition from
Np to trapping state T when the input is iq.

49. Convert the following NFA to DFA:

50. Consider the language L = {anbncm | n, m ≥ 1}. Describe a high-level strategy to


design a computational model that verifies the constraints on the number of
symbols.Discuss how the model would differentiate between the 'a's, 'b's, and
'c's.
51. Analyze the language L = {anbm | n ≥ m}, where the number of 'a's is greater than or
equal to the number of 'b's. How can you design a computational model that verifies
this relationship without ever explicitly counting the symbols?
52. Explain with an example how finite state machines are used to recognize languages.
Discuss their limitations in recognizing non-regular languages.
53. Develop an NFA that accepts all binary strings such that the third symbol from the left
end is 1 and the second symbol from the left is 0. Provide a state diagram, explain the
transitions, and demonstrate how your NFA processes various accepted and rejected
strings.
54. Give the formal definition of Turing machine with the help of 7-tuples along with
their meanings.
55. Discuss the role of Turing Machines in defining the limits of computation. Provide an
example of a problem solved using a Turing Machine.
56. Design a Turing Machine that can recognize palindromes over the alphabet {a, b}.
Provide a step-by-step explanation of how your machine works.
57. How can finite state automata be combined with graph theory to solve
practicalproblems like traffic light control or network routing in real-time?
Discuss the potential challenges and benefits.

You might also like