nothing to wi=uhifyuhj, Exams of Engineering

nothing to wi=uhifyuhjli jkfhsohl

Typology: Exams

2020/2021

Uploaded on 09/28/2025

arbin-rajbanshi
arbin-rajbanshi 🇳🇵

1 document

1 / 9

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CamScanner
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download nothing to wi=uhifyuhj and more Exams Engineering in PDF only on Docsity!

r TRIBHUVAN UNIVERSITY 1 Exam. INSTITUTE OF ENGINEERING =} Level =: BE _. FullMarks 60 | Examination Control Division { programme All EXcept pass Marks 24 | (Sample Question) {Year / Part : 1 Time ‘3 his. | amming \ ¥ Candidates are required to give their answers in their own words as far as practicable. wv Attempt All questions. Y The figures in the margin indicate Full Marks, Vv Assume suitable data if necessary. 1. Define computer program. Write an algorithm and draw a flowchart to calculate the HCF of two numbers entered by the user. [Hint: HCF is a number that divides both the numbers exactly. [l+4] 2. Why do we need type casting in C? Explain Header files & Library functions in C with an example [2+3] 3. Define Operator in C. Differentiate between pre and post-increment operators in C with proper examples. [1+3] 4. How formatted outputs are different from unformatted outputs [3] 5.a) Differentiate between counter-controlled & sentinel-controlled loops in C. Write a program in C to display the Armstrong numbers between given ranges P and Q. [Hint: An Armstrong number is a number that is equal to the sum of digits raised to the power total number of digits in the number, e.g. 1634 = 14+64434+44 = 1+1296+81+256 = 1634] [2+5] b) Display the following pattern using the concept of nested loop in C. B] 5 44 333 2222 1111 6.a) What is an array size? Write a program to read values of matrix of size MxN and display the second largest element. [I+5] b) Write a program to find the length of a string without using string handling function. B] c)What is a null pointer? Differentiate between referencing and differencing in pointer. [1+2] 7.Differentiate between auto and static storage classes? Write a program in C to find the sum of N even natural numbers divisible by 5. The value of N must be taken from the main CamScanner Algotiram: * hot Gok Flocthart: Shape: Dechre Varuabled Arb, vem, hot Declere vanabler ar b, rvem, h C Step 3: Laput a anc 6 Shepy. Yee ars $ $: 12 remecO e b TES, gob sep FinclLude int main() { int a[3][3],i, j,max,max2; printf("Enter the array elements:\n"); for(i=0;1<3;1i++) { for (j=0;j<3; j++) { scanf("%d",&a[iJ[j]); } } max=max2=a[0][0]; for(i=0; i<3; i++) { for(j=0; j<3; j++) { if (a[i][j]>max) max2=max ; max=a[i][j]; aise if (ali]Lj]>max2) max2=a[il][j]; } } } printf("Second Largest=%d",maxQ) ; return 0; CamScanner 4: gintlude Oo i indsAum (iat): — aT pots 3) Cont). i ink N, Sum ; . vintf (“Enter the vats. M2"): keant (“fa EN); Sams findsum(N ? " Printt( “Requived Sums fa , sum); jat findsusm Cint x ) int C#0,$5O,N, a print? (“Enter ouy indeger: "); Reanp (ted, £0); FC N7-2220 44 ny-5=20) Y $2Stn; } Ct; ywhile(C 100 | i print t( "s\n xl: name 3 s 5 { printf ("Enter okfeils of Camper po, (+e Print £/“\n enter nome 2") gets ( CLi)}- name); printt("\nEnrtevaadres:’) 7 1 (¢ Li} eetetress) - vint("\nénter ertablisked year:'); Acont ("f-h", € eli): ertablishedayeay) ; ) printe(*méntey no of atuclentt:”); Kean ("/-A”, €C Lid: NoWof- Atuclents) ; } dinplary (C 4);