0% found this document useful (0 votes)
18 views4 pages

bca-2-sem-advanced-programming-in-c-2002-p16-apr-2018

Uploaded by

dhagedatta87
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)
18 views4 pages

bca-2-sem-advanced-programming-in-c-2002-p16-apr-2018

Uploaded by

dhagedatta87
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/ 4

http://www.sppuonline.

com

Total No. of Questions : 7] SEAT No. :


P1007 [Total No. of Pages : 4
[5319] - 2002
F.Y. B.C.A. (Science)
BCA -202: ADVANCED PROGRAMMING IN ‘C’
(2016 Pattern) (Semester II)
Time : 3 Hours] [Max. Marks : 70
Instructions to the candidates:
1) Question No.1 (a and b) are compulsory.
2) Attempt any two questions from Group-I.
3) Attempt any two questions from Group-II.
4) Figures to the right indicate full marks.

Q1) a) Choose correct option: [7]

i) _____ symbol is used to terminate a string.

1) NULL 2) \0

3) . 4) /0

ii) Trace the output.

char str [20] = “Bye”;

printf ( “ % C ” , * str) ;

1) Bye 2) B

3) y 4) Error

iii) Which of the following is macro continuation preprocessor operator.

1) # 2) ##

3) / 4) \

P.T.O.

http://www.sppuonline.com
http://www.sppuonline.com

iv) Which of the following is appropriate for reading multi - word string?
1) printf ( ) 2) scanf ( )
3) gets ( ) 4) puts ( )
v) Data written into a file using fwrite ( )
Can be read back using
1) fscanf ( ) 2) fread ( )
3) fgets ( ) 4) All of the above
vi) If variable is a pointer to a structure, then which of the following
operator is used to access data members of the structure.
1) & 2) .
3) * 4) →
vii) Which of the following is compiler control directive?
1) # ifdef 2) # define
3) # include 4) All of the above
b) Answer the following: [7]
i) What is # pragma directive?
ii) What is purpose of strtok ( ) Function?
iii) Define pointer to pointer.
iv) How is a union declared?
v) Give syntax of fseek ( ) function.
vi) Find memory required for the following:
struct demo
{
int x ;
char y [15] ;
}d;
[Note - Assume ‘int’ takes 4 bytes]

vii) What is significance of orgv [0]?

[5319] - 2002 2

http://www.sppuonline.com
http://www.sppuonline.com

Group - I
Q2) Attempt the following:
a) What do you mean by ‘ Array of pointers’ and ‘pointer to array’? Explain
with an example. [5]

b) Write a C program that accepts ‘n’ words and display the longest word.[5]

c) Explain Bitfield concept with an example. [4]

Q3) Attempt the following:


a) Write a C program to check whether a string is palindrome or not. [4]

b) Write a difference between structure and union with example. [4]

c) Trace the out put and Justify. [3]


int main( )
{
static char s [ ] = “Tendulkar” ;
char * P ;
P = &S [8] - 8 ;
while ( * P )
printf (“ % C ” * p++ ) ;
}
d) Explain nested structure with an example. [3]

Q4) Attempt the following:


a) Explain ‘Function returning pointer’ concept. [4]
b) Write a C program to copy contents of one file into another file. [4]
c) Trace the output and Justify. [3]
union exam
{
int a, b;
};
union exame ;
e.a = 5;
e.b =7
printf ( “ % d ”, e.a );

d) List any three string handling function with their usage. [3]
[5319] - 2002 3

http://www.sppuonline.com
http://www.sppuonline.com

Group - II
Q5) Attempt the following:
a) Write a C program to accept and display book details of ‘n’ books as
book-title, author, publisher and cost. [5]
b) Write user defined functions to copy one string into another string and
reverse the string without using standard library functions. [5]
c) Define Dynamic memory Allocation. What are the advantages of dynamic
memory allocation over static allocation? [4]
Q6) Attempt the following:
a) Explain fseek ( ) function in detail. [4]
b) Compare Macro and Function. [4]
c) Trace the output and Justify. [3]
struct student
{
int roll ;
char name [10];
} S1, * P, S[5];
printf (“% d % d % d”, sizeof (S1), sizeof (P), sizeof (S));
d) Define union. Explain how to access it’s member. Give example.[3]
Q7) Attempt the following:
a) Explain ‘pointer to structure’ concept with example. [4]
b) Discuss file opening modes in detail. [4]
c) Explain any three predefined macros. [3]
d) Explain the purpose of each of the following. [3]
declarations
i) int *P [5]
ii) int f1 (int *P [ ])
iii) int * f2 (int *P [])

² ² ²

[5319] - 2002 4

http://www.sppuonline.com

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy