Professional Documents
Culture Documents
Scan 13 Jun 24 16 30 08
Scan 13 Jun 24 16 30 08
Scan 13 Jun 24 16 30 08
fuoqsammlng
tormat comm
lohat are the d}er rent data
types Ey
math
Specihiens in c2
dy pe > Struct, Union, etc
User de ined data
doays. Fun ions, Pointe.
Deriv ed data ty foat
Built in char,
data Vord, int,
db
TOTmat Sperts-
3ist ut Nodigcexs
Signed| Unigned
Lor
ort Integerá
Modifers.
an alternate
type def key
The key
cword
word ty pedef is
uL ed to defhe
an already eishing
name tor
type
Various 5 modes
Y- Open a le in read mode
create text file in orite mode
W- open S or a
4. Toportan ce Of ponter
Pointer allow us to manpulotethe.
data uin computers
cthe memory
Pointer_can redute the code and
fnprove the performan e
They are important for dynamic
memory altocati on , passing argumenta to
unchions, cworkinq with amays
beginning
and each tme
the
a
sile twhenit
character ig tead o
s
cpened,.
18
Dynamic Hemory allocatron is the
reac)
a Deco hle.
add the deta at end e
aoQine Unien.
Gs user- defined a
defined
nton can be a collect'on of ditferent
data type which ig in the
8o me
Variables different data types
mermory ocation
.
printf ("Diqits
do
digtt =number I0
printf ("/. digt),
d In",
eoternal &torage.
t is pecifi'ed gott by the extern keycuord,
isused to dedlare a Naria ble that delned in
8TRUCTURE UNION
detne a gttuctue
7Each Hember withina &trucute Hernory allaated ie shared
integerarray. (7)
(OR)
Write a recursive function to sum the given n-digit number. (4)
13. b. ()
(ii) Write a recursive function to count the digits of a number. (4)
(OR)
14. b. Explain about dynamic memory allocation and its methods with
(13)
)
examples.
(ii) Explain how to read and write a file using fscanf) and fprintf)
function. (7)
(OR)
arguments with suitable example. (6)
15. b. (i) Explain command line
16. a. In acollege, assessment marks for a subjectis entered for students. The N
program must accept N
studentsmarks and print the total number of
studentspassed, failed and absent.
Constraints for evaluation:
(A) The mark forabsentee studentswill be entered as -1.
(B)The pass mark for the studentshould be greaterthan or equal to 40
(marks less than 40 is considered fail)
Create the following user defined functions:
intn)
intget_absent_count(int array[],
int get_pass_count(int array[],intn)
int get _fail_count(int array[],int n)
Sample input:
First line: 10 (Number of students)
B.E/B.Tech. DEGREE EXAMINATIONS, APRIL / MAY 2023.
Second Semester
(Regulation 2022)
Time: Three hours
Maximum:100 marks
Answer ALL questions.
12. a. Explain array and its types with syntax and example.
(13)
(OR)
line: 56 23 -128 78 89 64 53 -196 (marks)
Second
Sample output:
No. of students passed: 6
No. of students failed: 2
(15)
No. of students absent: 2
(OR)
waiters available, there comesN family
one by
16. b. In a restaurant there are M
wl > f1(15),f4(10),f7(15),f10(20)
w2 -> f2(10),f5(20),f8(25)
w3 -> f3(15),f6(30),f9(20)
total family served by 4 and tips amount is 15+10+15+20 =60
wl is