Advanced 'C' Question bank(2024-25)(patt.2019)
a)
Define pointer to pointer.
b)
Which
functions are used to read a string?
c)
Demonstrate “structure within
structure” with example
d)
What is the use of strcat()
function.
e)
Define generic pointer.
f)
What is string? Give example.
g)
Which
function is used to open a file?
h)
What is use of strcpy() with
syntax.
i)
What is
command line argument?
j)
What is file?
k)
Define pointer to pointer.
l)
Which
functions are used to read a string?
m)
Demonstrate “structure within
structure” with example
n)
What is the use of strcmp()
function.
o)
Define generic pointer.
p)
What is string? Give example.
q)
Which
function is used to open a file?
r)
What is use of strcpy() with
syntax.
s)
What is
command line argument?
t)
What is macro?
Answer the following
a)
Write
short note to accessing structure members with example.
b)
What
is array of pointers with example?
c)
What
is purpose of fseek()?
d)
What
is the use of #include directive.
e)
Explain the functions which are
used for dynamic memory allocation
f)
Explain in
brief concept of macros substitution directives.
g)
Write a ‘C’ program to accept a
string convert in lowercase without using built - in function.
h)
Write a ‘C’ program to accept a
string convert in uppercase without using built - in function.
i)
Explain following functions
with syntax and example fgets(), fputs(), fscanf (),
fprintf ()
j)
Define
Structure. Explain with example.
k)
What
is array of pointers with example?
l)
What
is purpose of ftell()?
m)
What
is the use of #define directive.
n)
Explain the functions which are
used for dynamic memory allocation
o)
Write a C
program to declare book structure (bookno, bookname, author). Accept details of
n books and display books of particular author.
p)
Write a C program to
interchange two numbers using pointers.
q)
Write a ‘C’ program to copy
content of one file to another.
r)
What is the output of following
C code? Justify
1) #include<stdio.h>
int main()
{
int a[]
= { 2,4,6,10,12} ;
int
*ptr;
ptr =
a;
printf("
%d ", *( ptr + 2) );
return
0;
}
2) #include<stdio.h>
int main()
{
int a[]
= { 1, 2, 3, 4, 5} ;
int
*ptr;
ptr =
a;
printf("
%d ", *( ptr + 1) );
return
0;
}
2) Differentiate union and structure.
3) Differentiate macro & function.
Comments
Post a Comment