Complete assingment of BCA 1st Semester session 2009 And the Center Code is 02005 Assingment -1 Note: For opening fi...
Description
BCA -SEMESTER 1 c
COMPUTER CONCEPT ~ C PROGRAMMING cccc
1.c Ques: What is the difference between declaration and initialization? Explain with example.cc c c c c cc ccc c
cM cc c c c cc ccccc c
c c c
c c cc ccc ccccc c cc cc cccc c c cccc ccc c!c ccc c cc ccc " c c cc cccc cc M ccc ccc ccc cc cc c #$%cc c c cccccc cc$%cc " c!cc
c$cc
c
c &'c c#c cc (c c cc c c " c c c c !cc cc#c$c c c#c&'c cc#c cc
D. Ques: What is conditional operator? using conditional operator find a smallest number among two numbers.
Ans: The Conditional operator V c cccccc ccc cc c c cc ccc
6 c6 6
! c6 6 "cc6 #cc $cc V ccc % c c c6 cc $cc c&c'c c c c6 "c ccc c ccc c $c(c6 c 'c 6 ccc cc c ccc c $c)c'c c c c cc **cc "**cc +cc (c c'cc cc c ccc$cV ccc c c c$$$, c c c cc
c +cc cc cc #cc
[. Ques: What are the commonly used input/output functions in C? How are they accessed.
Ans:c Àc c c c c c c c c c c c c c c c c)*+c c c c -c c c cc c *c !cc c*'c c*'c c*'c c*'cc*c,cc*cc c*'c c*'c c*'c c*'cc*c cc*cc c
cc c c cc- c cccc cc c. c c c c c c cc c*c c c*cc c.c ccc c.c c c c*c c c*cc c.c c c c- c c c c c cc c cc.cc%c cc%c cccc c c c*'c c*'cc*c cc*c ccc c c
cc
- c c ccc. cc c c c c cc cc
A
cc
c- cc c cc c c c c c c c cc cccc c c cc!/cc c 0 cc cc "ccc cc #c 1cccc cc
V cÚ cc - c c. cc c c c.ccc cc. c cc c. c cc c c2c2c !cc )3c +cc
c#c cc 4 cc c 5c2 .c ccc.c cc cc c. c c cc cc ccc c'ccc cc$cc
,c.ccc c cccccc /cc0c $ c3c cccc 1cc ccc cVccc c2'c,ccc cc0c*c-3c %c c cc cccc3-cc cc4cc-3c(cc cc cccc $c3c-c cV c cc c2cc5'ccc 6cc
V cÚ cc ( cc c cc c cc c c c c7c. cccc cc c cc c c8cc c !cc ) c3c%+cc cc cc cc c9cc )7 5c c: 7+cc c#c%cc
c
Nesting of Ú c cc
( c c cc cc c c c $c)c c'c ccc c c cc%cc ccc c c c $c)c'c c cc cccc c c c c6cc c c c %c'c ccccc c c cc c %c 'ccc cc c c cc c %c cc
Example: +c*cc 1cc c+c*cc c7 $5cc c
cc
$5cc
c 6 cc cc
>
1cc
>
+c*cc
>
7c $c5ccc
>
cc
>
8cc
$c5cc
! cc ccc ccc c c 'c cccccc c c c1c8'c c 'cc%ccc ccccc cc c c cc c c c c c$c( c cccccc c c 'c c c 'cc%c ccccc $c! cc c9c ccc%c cc cccc cc c 'cc cc cc cc cc cc c c c6cc c c $cV 'cc c cc%c c c cc c $cc
l. Ques: Explain with general syntax the switch statement. Ans: The switch statement V cswitch case ccc cccif c ccccc cc cc cc c c ccc c cc'c c c ccccchar). V c ccc cswitch case cc $cV c cc ccccswitch ccc cc c cc c 'cc
ccc c ccc c'c cc cc c cc c$cc
>
cc0+cc1c
c
c :cc
cccc0+cc :c %cc c :cc
cccc0+cc :c %cc
cc
cccc0+c cc6c cc ccc c cc %cc
8cc
. Ques: Write a recursive program to solve Towers of Hanoi problem. Ans: c /0 $ +c cc 1cc c; c
Thank you for interesting in our services. We are a non-profit group that run this website to share documents. We need your help to maintenance this website.