Sunday 13 November 2011

cprogramming new pattern question papers mca

 c programs for Practice Model question paper.  new pattern for MCA.
|  Important Questions .
what will be the output will it gives  right output or there is error in given program find out.

1) main ( )
{
ihi x=4, y = 0. z ; while (x> = 0)
{
if (x = = y) break ; x- -; y + + ;

printf ("x = % d \t y = %d'\ x,y);
)
will it gives error or will give the input.
2) main ( )
(
irit a = 2, b = 3 ; a = + + a *+ + a ; b=++b*b++; a = + + a * + + b ; b = + + b *+ + a ; printf ("a = % d\t h = % d'\ a,b) ;
}
3) main ( )

inl a = a7 ;
int * b = & a ; .
while ( ♦ b! = 100)
I
printf ("%c'\ ,b + + );
)

5) # define SQR (x) x* x
# define CUBE (x) x* x« x
main ()
{
int a, b :
a =2 : b = CUBE ( ++a) / SQR (a ++) printf ( "a = % d \i b = % d" , a, b );   I



write the Answer  of  the followings programs.

a) How to Write a C function X cmp ( const char *. const char *) to accepts two strings
and returns (|) if both strings are equal, returns + 1 if first string is larger,
returns - ! if first string is smaller than second string ?
b) How to   Write C program that illustrates use of type casting and static storage class ?  

a)  How to  Accept the siring and check whether it is palindrome or not without using
string function ? try to execute also.

b)  How to  Write C program to accept the string from user until user enters "ddd", and
display last two strings entered, use dynamic memory allocations.
4. a) Write a C program using recursive function to sum the digits in a number.    
b)  How to  Write a C program to accept 5x5 array of integers and calculate and display
sum of each row.
5.  How to  Write a menu driven program in C to maintain the record of STUDENT file.
Operations performed on files are :
I >To  Add Record 2)To  Modify Record
3) To Delete Record 4) To Display Record.

1) How to   Write the program "Cast. C" that prints last V lines of text file accepted
through command line. 6
2) How to  Write the program in C to copy the contents of file 1 to file 2 skipping all
vowels Irom file 1, write down code also. and execute it.







1. write down the output of following programs.
i) main ()
{
static char str [ ] = "The break down probability of an equipment"; printf (" %s %S %s", str, str + 6, (* (str + 8) - 32);
}
j) main ()
{
inta= 10, b = 20;
printf ("ans = % d", a > b : a*a : b/b); )
k) main ()
{
int x = 3, z: z = x+++ 10;
printf ("x = %d, z ■ %d", x, z); }
l)
#
defme CUBE (X) (X*X*X) main ()
(
int a, b = 3;
a = CUBE (++b / -H-b); printf ("a = %d b = %d", a, b);

m)
main ()
{ static char a f] = "Able was I ere 1 saw elba' char *t, *s, *b; s = a;
b = a+ strlen (a) - 1; K t = b;
while (s ! = t) {
printf ("%c", *s); s++;
prinf("%c", *t); t-;
}
n)
main () { struct a
{
char arr[lO|; char *str;
);
static struct a si = {"Oracle", "Java"); printf("%c %c I n," sl.arr[0|, *sl.str);
)
Share This
Previous Post
Next Post

FYJC XI standard online admisson Process and declaraton of Merit list . Cut off List For prevous year also . 10 Th Results onlne declaraton Maharashtra Region .

0 comments: