Saturday, 18 May 2013

Challenging C Interview Objective Questions



1. void main()

{

char s[ ]="man";

int i;

for(i=0;s[ i ];i++)

printf("\n %c", i[s] );

}//What is o/p?

(A)man (B) nam

(C)mmm (D)compilation error



2. main( ){

static int var = 5;

if(--var)

main();

printf("%d ",var++);

}//What is o/p?

A)0 1 2 3 4 B)1 2 3 4 5

C) compile error D)0 0 0 0 0

3. main() {

printf("\rbba");

printf("\baab");

printf("\raa");

}//What is o/p?

A) aa B)aaaab

C)aabab D)bbaaa



4. void main()

{

char str[] = "Hello World";

display(str);

}

void display(char *string)

{

printf("%s",string);

}//What is o/p?

(A)Hello World (B) Hello

(C)H (D)Compilation Error

5. void main()

{

int a[3][2][2] = { {1,2,3,4}, {5,6,7,8},{9,10,11,12} };

int *p,*q;

p=&a[3][2][2];

*q=***a;

printf("%d-%d",*p,*q);

}//What is o/p?

(A)12-1 (C)9-1

(C)1-12 (D)None of these

6. #define f(a,b) a/b

void main() {

int x=5,y=6;

printf("\n%d",f(x*6,y*x));

}//What is o/p?

(A)1 (B)25

(C)30 (D)None of these

7. void main( ) {

char *ch="Computer ";

while(*ch!='\0') {

++*ch;

printf("%c ",*ch); ch ++; }

}//What is o/p?

(A)Dpnqvufs (B)Donpvtfr

(C)Cpmquues (D)None of these

8. void main( ) {

static char names[5][7]={"pascal","java","cobol","fortran","perl"};

int i;

char *ch;

ch=names[3];

names[3]=names[4];

names[4]=ch;

printf("%s",names[4]);

}

(A)Compilation Error : Array index out of Bound

(B)Compilation Error: char Array is constant Pointer

(C)fortran

(D)perl



9. void main( ) {

int x=10,y=10,*p1,*p2,k;

p1=&x;

p2=&y;

k=5 + *p1 /*p2;

printf(“%d”,k);

}

A)6 B)5 c)Compile Error d)None of these

10. main( ) {

char *q;

int j;

for (j=0; j<3; j++) scanf(“%s” ,(q+j));

printf(“%s” ,(q));

}//Input are:ASPIRE,JAVA,OCJP

(A)AJOCJP (B)ASPIRE

(C)OCJP (D)None of these

11. void main ( ) {

static char *ch[ ] = {"black", "white", "yellow", "violet"};

char **ptr[ ] = {ch+3, ch+2, ch+1, ch}, ***p;

p = ptr;

**++p;

printf(" %s",(*--*--p + 4));

}

(A)ow (B)et

(B)k (D)e

12. f2(a,b)

int a;

float b; {

return( a = !(a==b) );

}

void main() {

int p1(), f2();

printf("The value is %d \n ",p1(f2,6,6.0));

}

p1(f2,val1,val2)

int (*f2) ();

int val1;

float val2;

{

return((*f2) (val1,val2));

}

(A) The value is 0 (B) The value is 1

(C) The value is 0.0 (D)Compilation Error



13. f(int n) {

If(n>0) return (n + f(n-1));

}

void main() {

printf(“%d”,f(10));

}

(A)55 (B)110

(C)45 (D)compilation error

14. void main() {

Char *ch = “hello”;

printf(ch);

}

(A) hello (B) compilation error

(C)run time error (D) None of these

15. void main(){

int x=1,y=0;

if (++x > 2)

if(++y<5)

y=100;

else

x=100;

printf(“ %d %d”, x,y);

}

A)100 0 B)100 100 C)100 2 D)None of these





16. what is the output of following?

void main(){ printf("%d",1||2); }

a. error b .1 c. 3 d. None of these

17. What is the output of following ?

void main(){

int i=100, j=200 , k=300;

printf("%d ,%d" ) ; }

a. 200,300 b. 300,200 c. 100,200 d .error

18.What is the output of following ?

abc(int i){

printf("%d",i); }

void main(){

abc((200,100)); }

a. 200 b . 100 c . compile time error d. run time error

19.What is the output of following ?

void main() {

abc() ; }

abc(){

printf("Hello");}

a. error of no prototype b. warning c . Hello d. Both b & c

20. What is the output of following code ?

void main(){

printf("ab\b"); printf("ab\r"); printf("a"); }

a. aaa b. abb c. aba d.None

21.What is the output of following code ?

void main(){

int far *p,*q;

int c;

c=sizeof(p)*sizeof(q)*sizeof(4); printf("%d",c);}

a. 4 b. 32 c. 8 d. 16

22.What is output ?

void main(){

int i=5;

printf("%d",(i++ + ++i) || (++i + ++i));

printf(" %d",i);}

a. 1 9 b. 1 6 c. 1 7 d. compiler dependent

23.What is the output?

#define fun(x,y) (x##y)

void main(){int i

;i=fun(200+5,5+200);

printf("%d",i); }

a. run time error b. 1 c. 455 d. 205205

24.What is output ?

void main (){int x ; printf("%d",x=10);}

a. Error b. 10 c. 1 d. garbage value

25.What is the output ?

void main()

{ int a,b=0;

if( a=b=0 )

printf (" Hello ");

else

printf ("World"); }

a. Hello b. World c. compile error d. Runtime error

26.Waht is the output ?

void main(){

int i,j,k;

printf("%d",printf("%d",scanf("%d", &j)*scanf("%d",&i))); }// input is i=10 j=10

a. 100 b. 11 c. 1 d. 0

27-What is output of following ?

void main(){

static int i;

for( ; i++ ; printf("%d ", i) );

printf("%d",i); }

a. infinite loop b. error c. 0 d. 1

28-int testarray [3] [2] [2] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};

What value does testarray [2][1][0] in the sample code above contain?

a. 3 b. 5 c. 7 d. 11

29-void myFunc (int x) {

if (x > 0)

myFunc(--x);

printf("%d, ", x); }

int main() { myFunc(5); return 0; }

What will the above sample code produce when executed?

a. 1, 2, 3, 4, 5, 5, b. 4, 3, 2, 1, 0, 0 c. 5, 4, 3, 2, 1, 0, d. 0, 0, 1, 2, 3, 4,

30-11 ^ 5

What does the operation shown above produce?

a. 1 b. error c. 5th power of 11 d. 14

31-What is the output of following

#define man(x,y) x>y?x:y;

void main(){

int i=10 , j ,k;j=5;k=0;

k=man ( i++ , ++j );

printf("%d %d %d",i,j,k);}

a. 12 6 11 b. 11 6 10 c. 11 6 11 d. 12 6 10

32-What is the output of following ?

#define mess junk

void main(){ printf("mess"); }

a. mess b. junk c. meshjunk d. error that mess cant be used in printf

33-Wha is the output of following ?

void main() { int g=300*300/300; printf("%d",g); }

a. 300 b. 81 c. error d. 1

34-#define square(x) x*x

void main(){ int i=10, j=5 ,k=0; k=square(i-j); printf("%d",k); }

a. 25 b. 45 c. 75 d. 0

35-What is the output of following?

void main(){ int i=024; printf("%d",i); }

a. 24 b. 024 c. 20 d. None

33-What is the output of following ?

void main(){

char *p; p="He"LL"o"; printf("%s",p); }

a. he"LL"o b. HeLLo c. error d. He

34-What is output ?

abc(){

int a;

if(1>0)

return 1;

a=100;

a++;

return ++a;}

void main(){

int i ; i=abc(); printf("%d",i);}

a. 1 & 1 warning b. 1 & 2 warning c. 1 & 3 warning d. 111

35- What is the output ?

abc(int i){ return i; }

void main(){

int i; i=abc(printf("Hello World")); printf("%d",i); }

a. 11 b. error c. 12 d. None

//36-What is the output ?

void main(){

char far* near* str; printf("%d",sizeof(str)); }

a. 2 b. 4 c. error d. 1

37-What is the output ?

void main(){

const int i; int k=10; i=100; k=++k + i; printf("%d",k); }

a. 111 b. error c. 112 d. None

38-What is the output ?

#define printifless(x,y) if(x<y) printf("%d",x)

void main(){

int i=2,k=1;

if(i>0 && k>0)

printifless(i,k);

else

printf("A"); }

a. A b. nothing c. error d. 2

39-What is the output ?

void main(){

int a=10,b=20,c=30,d=40;

if(a,b,c,d)

printf("Hello"); }

a. Hello b. error c. warning d. Hello10203040

40-What is the output?

main(){

int i=100,j=10,k;

int *p=&j; k=i/*p;

printf("%d",k);}

a. 10 b. error c. warning d. 1

41-What is the output?

main(){

extern int i ; i=20; printf("%d",i);}

a. compile error b. runtime error c. linker error d. 20

42-What is the output ?

main(){

int i=-1 ,j=-1,k=0,l=2,m;

m=i++ && j++ && k++ || l++;

printf("%d %d %d %d %d",i,j,k,l,m);}

a. error b. 0 0 1 3 1 c. 0 0 1 3 2 d. warning

43- main(){

static int i;

switch(i) {

default:printf("garbage");

case 0: printf("Zero"); break;

case 1:printf("one"); break;

case 2: printf("two"); break; } }

a. error b. zero c. garbage zero d. zero grabage

44-What is output ?

main(){

printf("%x",-1<<4);}

a. ff00 b. ffff c. 240 d. None

//45-What is output ?

main(){int i=5; printf("%d%d%d%d%d",i++,i--,++i,--i,i); }

a. 54554 b. 45545 c. 54454 d. 45445

46-.What is the output ?

#define square(x) x*x

main(){

int i;

i = 64/square(4);

printf("%d",i);}

a. 16 b. 64 c. 4 d. error

47-Size of structure can be determined by

1-sizeof(variablename) 2-sizeof(struct tag)

a. only 1 b. only 2 c. both 1 & 2 d. none

48-What is the output ?

main(){

printf("%p",main);}

a. some address b. undefined symbol error c. 0xfa d. None

49-#define int char

main(){

int i=65;

printf("%d",sizeof(i));}

a. error b. 1 c. 2 d. 0

50-What is the output ?

main(){

char string[]="Hello World";

display(string);}

void display(char *string){

printf("%s",string);}

a. "Hello World" b. Hellow World c. error d. warning & Hello World



3. main( ) {

float c[]={1,2.2,3.2};

float i,*p=c,*q=c;

for( i =0; i<3;i++,*q++;)

printf("%2.1f ",*c);

for(i=0 ; i<3 ; i++,(*p)++)

printf("%2.1f ",*p);

}//What is o/p?

A)1.0 2.2 3.2 1.0 2.2 3.2 B)1.0 1.0 1.0 1.0 2.2 3.2

C)1 2 3 1 2 3 D)1 1 1 1 2 3

14. void main() {

void f1();

void f2();

f1();

}

void f1() {

f2();

printf(“in f1”);

}

void f2() {

printf(“in f2”);

}//what is o/p?

(A) Compilation Error (B)in f2

(C) in f2in f1 (D)None of these

16. void main() {

char *p; int *q; long *r;

p=q=r=0;

p++; q++; r++;

printf("%p...%p...%p",p,q++,r++);

}

A)0001...0004...0008 B)0001...0002...0004

C)0001...0002...0002 D)0002...0004...0008

17-What is a difference between a declaration and a definition of a variable?

a. Both can occur multiple times, but a declaration must occur first.

b. A definition occurs once, but a declaration may occur many times.

c. A declaration occurs once, but a definition may occur many times.

d. Both can occur multiple times, but a definition must occur first.

28-What is the output ?

void main() { char *s="\12345s\n"; printf("%d",sizeof(s)) }

a. 7 b. 6 c. 8 d. 5







































Awareness


Religion is all about awareness .If u r aware u r religious person .
Let Me tell u a story 
Once there was a king who wanted to find out what is truth . So he went to a saint living in a small hut outside his kingdom .The saint told him that " if u want to learn  u will have to live  here and do what I instruct u If u r ready  I can give u the answer ." The king agreed .
The next day the saint saw him a wooden rod  and told him that he will struct him with that rod at any time of the day and he(the king) will have to defend himself . For a moment the king thought that the saint was mad . But then also he agreed . Now the saint used to come at any time of the day and  beat the king with that rod . The first week was very tough for king to defend but soon he began to defend himself because it was a do or die situation for him .  We also learn the things very fast when we read few hours before the exams as it is a do or die situation for us .Then after one month the king was able to defend all the blows from the saint no matter how hard the saint tried because he used to remain alert the whole day .
 The next day the saint came and told him that now he would beat him with that rod even at night  when he is sleeping .The king was shocked but then also he agreed because he wanted to find what is the truth or true  religion .Such should be the intensity of every student to know the answer .  The first week was very tough for him . The saint used to come at mid night and beat him . But after that the king began to defend  the blows . His sleep began to be like that of dog . In our scriptures there is one verse which says that the sleep of a student must be like that of  a dog , deep as well as sensitive . The dog will wake up immediately if he hears the foot steps even at midnight . In few months the king was very well trained himself .The saint could not blow him because he used to remain aware in the sleep also .
But now the king realized that in the last few months he used to remain totally aware and that gave his mind so much of peace .When u r totally aware ur mind gets peace . For thousands of years man has been searching for peace and happiness in others . But he has not found yet  because the reality is that that peace and happiness is inside us .It looks strange at first but just be aware when u feel happy from where does this happiness and peace is comming . It is not coming from that beautiful girl or from handsome boy but from a beautiful soul residing in you . The king realized it and bowed down to the saint .
Usually saints give teaching not through words but through their actions and deeds . The saint told the king that now u have understood what truth is u can return the kingdom . So in the evening on the day before he was going to depart , they were sitting in the veranda . The king thought that the saint took a very tough tect of him so let me see how aware he(the saint ) himself is . So he decided that he pick up the wooden rod with which the saint used to beat him and  strike the saint from behind . As soon as he was going to stand up , the saint said " Hey dont try to pick up that rod , I am too old to defend myself " . The king was puzzled  and bowed down to the saint asking him how he(saint) read his(king's) mind . The saint said  : - "Just live here for few months and I can teach u that also ." 
Such is the power of  meditation  and this is what true religion is !!!!!!!! 

Project Definitions

Java / PHP/Android Projects


1- Blogger Site

2. Create a Bug tracking System

3. Matrimonial Site

4. Online Buying/Selling 

5. Online Hospital Management

6. Online Institute Management

7. Online Travels Management

8. Online Debate System

9. Online Project Management

10. Online Personal Diary

11. Job Portal

12. Online Medical Management

13. Online Real Estate Management

14. SQL Explorer (eg . HeidiSQL)

15. Online PG Management

16. Online Transport Management

17. Online Exam System

18. Virtual Stock Market

19.  Freelancing Web site

20. Application for Admission Committee (e.g. JACPC )

21. Online Electronic Shop Management

22. College ERP (Attendence , Login , Exam, Salary , Lectures Time Table)






Wednesday, 15 May 2013

Example showing the use and importance of Generics

An Example of Generics Usage . Learn this and know the importane if Generics in java . So much of the code has been saved in Java API because of Generics especially in the Collection API . After reading the below short program u will know why ?

public class Stack<E extends Object> {

Object o[];
int limit;
int sp=0;
public Stack(int size){
o=new Object[size];
limit=size;
}
public void push(E e){
if(sp==limit){
System.out.println("Stack OverFlow");
}
else{
o[sp]=e;
sp++;
}
}
public E pop(){
E e = null;
if(sp==0){
System.out.println("Stack UnderFlow");
}
else{
sp--;
e= (E) o[sp];
}
return e;
}
}

Usage of above class :-

Demo.java

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package code;

/**
*
* @author Aspire
*/
public class Demo {
public static void main(String...arg){
Stack<Integer> intStack=new Stack<Integer>(3);

intStack.push(1);
intStack.push(2);
intStack.push(3);
intStack.push(4);

System.out.println(intStack.pop());
System.out.println(intStack.pop());
System.out.println(intStack.pop());

Stack<String> stringStack=new Stack<String>(3);

stringStack.push("Aspire");
stringStack.push("Institute");
stringStack.push("Best Place");
stringStack.push("for learning java");

System.out.println(stringStack.pop());
System.out.println(stringStack.pop());
System.out.println(stringStack.pop());

Stack<Animal> animalStack=new Stack<Animal>(3);
Animal a1=new Animal();
a1.name="Donkey";
animalStack.push(a1);

Animal a2=new Animal();
a2.name="Dog";
animalStack.push(a2);

Animal a3=new Animal();
a3.name="Horse";
animalStack.push(a3);

System.out.println(animalStack.pop().name);
System.out.println(animalStack.pop().name);
System.out.println(animalStack.pop().name);

}
}

class Animal{
String name;
}

In this way u can use the same Stack Class for Float ,Double , or for any userdefined class u want .

Challenging Questions in C


1-what is the output of following?
void main(){   printf("%d",1||2);   }
a.         error                b         .1         c.        3          d.         None of these
2-What is the output of following ?
void main(){
int i=100,  j=200  ,  k=300;
printf("%d ,%d" ) ;  }
a.      200,300    b.       300,200          c.        100,200           d          .error
3-What is the output of following ?
abc(int i){       
printf("%d",i);              }
void main(){    
abc((200,100));                       }
  1. a.      200       b .                100            c .          compile time error       d.         run time error
4-What is the output of following ?
void main() {
abc() ; }
abc(){
printf("Hello");}
a.         error of no prototype   b.      warning     c .     Hello     d.       Both b & c
5-What is the output of following code ?
void main(){
printf("ab\b");  printf("ab\r");  printf("a");       }
a.         aaa     b.         abb      c.        aba      d.None
6-What is the output of following code ?
void main(){    
int far *p,*q;
int c;
c=sizeof(p)*sizeof(q)*sizeof(4);           printf("%d",c);}     
 a.        4          b.        32        c.         8          d.        16
7-What is output ?
void main(){
int i=5;
 printf("%d",(i++ + ++i) || (++i + ++i)); 
printf(" %d",i);}
a.         1 9       b.         1 6       c.         1 7       d.        None of these
8-What is the output?
#define fun(x,y)  (x##y)
void main(){int i
;i=fun(200+5,5+200);
printf("%d",i); }
a.         run time error              b.        1          c.        455      d.         205205
9-What is output ?
void main (){int x ;  printf("%d",x=10);}
a.         Error               b.         10        c.         1          d.         garbage value
10-What is the output ?
void main()
{  int a,b=0;
if( a=b=0 )      
printf (" Hello ");
else
printf ("World"); }
a.         Hello                b.         World               c.         compile error               d.        Runtime error
11-Waht is the output ?
void main(){
int i,j,k;           
printf("%d",printf("%d",scanf("%d", &j)*scanf("%d",&i))); }// input is i=10 j=10
a.         100       b.        11        c.        1          d.         0
12-which of the following declarations is valid ?
a.                     void fun(int )    b.        void   fun(int i,...)         c.        void fun(int i,j)                                                                 d.         None
13-What is output of following ?
void main(){    
static  int  i;
for(   ;  i++  ;   printf("%d ", i) );
printf("%d",i);  }
a.         infinite loop     b.        error   c.         0          d.        1
14-What is the value of EOF ?
a.         -1        b.         0         c.         any garbage value       d.         may be a or b
15-When all the data r read from file ,feof(filepointer) will return
a.         0          b.        -1        c.         any non zero value      d.        depends on compiler
16-what does tho following function do ?       
str=strlwr(str) where str=string
a.         convert all lowercase letters to uppercase       b.         convert all uppercase letters to lowercase       c.            convert 1st letter to upper & rest to lower       d.         none
17-What is a difference between a declaration and a definition of a variable?
a.         Both can occur multiple times, but a declaration must occur first.
b.         A definition occurs once, but a declaration may occur many times.
c.         A declaration occurs once, but a definition may occur many times.
d.         Both can occur multiple times, but a definition must occur first.
18-int testarray [3] [2] [2] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
What value does testarray [2][1][0] in the sample code above contain?
a.         3          b.         5          c.         7          d.         11
19-void myFunc (int x) {
   if (x > 0)
   myFunc(--x);
   printf("%d, ", x); }
int main() {    myFunc(5);    return 0; }
What will the above sample code produce when executed?
a.         1, 2, 3, 4, 5, 5,             b.         4, 3, 2, 1, 0, 0              c.         5, 4, 3, 2, 1, 0,             d.         0, 0, 1, 2, 3, 4,
20-11 ^ 5
What does the operation shown above produce?
a.         1          b.         error    c.         5th power of 11          d.         14
21-time_t t;
Which one of the following statements will properly initialize the variable t with the current time from the sample above?
a.         t = clock()        b.         time( &t );        c.         t = ctime();       d.         t = localtime();
22-What is the output of following
#define man(x,y) x>y?x:y;
void main(){
int i=10 , j ,k;j=5;k=0;
k=man ( i++ , ++j );
printf("%d  %d  %d",i,j,k);}
a.         12 6 11                        b.         11 6 10                        c.         11 6 11                        d.         12 6 10
23-What is the output of following ?
#define mess junk
void main(){      printf("mess");    }
a.         mess     b.        junk     c.        meshjunk         d.         error that mess cant be used in printf
24-void main(){
int y=128;
const int x=y;      printf("%d",x);     }
a.         128      b.         compile error               c.         warning           d.         0
25-Wha is the output of following ?
void main() {       int g=300*300/300;         printf("%d",g);      }
a.         300      b.         81        c.        error                d.         1
26-What is the output of following ?
void main(){    int x;     x=3*4%5;      printf("%d",x);    }
a.         12        b.         0          c.         2          d.         1
-à27-#define square(x)   x*x
void main(){    int  i=10,  j=5   ,k=0;     k=square(i-j);      printf("%d",k);     }
a.         25        b.         45        c.         75        d.         0
28-What is the output ?
 void main() {      char *s="\12345s\n";           printf("%d",sizeof(s))       }// \n check
a.         7          b.        6          c.        8          d.         5
29-Find number of errors in following ?
 int f();
 void main()  {
        f(1);        f(1,2);        f(1,2,3);      }
      f(int i,int j,int k)      {
        printf("%d %d %d",i,j,k);       }
a.         1          b.        2          c.         None                d.        0
30-Which one of the following will declare a pointer to an integer at address 0x200 in memory?
a.         int *x; *x = 0x200;     b.        int *x( &0x200 );         c.        int *x = *0x200;          d.         int *x = 0x200;
31-What will x contain in below code ?
int x=011  |  0x10;
a.         3          b.        13        c.        25        d.         None
32-What is the output of following?
void main(){    int i=024;    printf("%d",i);     }
a.         24        b.        024      c.         20        d.        None
33-What is the output of following ?
void main(){
char *p;    p="He"LL"o";    printf("%s",p);  }
a.         he"LL"o           b.         HeLLo              c.        error                d.         He
34-What is output ?
abc(){
int a;
if(1>0)
return 1;
a=100;
a++;
return ++a;}
void main(){
int i  ;  i=abc(); printf("%d",i);}
a.         1 & 1 warning             b.        1 & 2 warning             c.        1 & 3 warning                         d.         111
35- What is the output ?
abc(int i){    return i;   }
void main(){
int i;    i=abc(printf("Hello World"));    printf("%d",i);    }
a.         11        b.        error    c.        12        d.         None
//36-What is the output ?
void main(){
char far* near* str;     printf("%d",sizeof(str)); }
a.         2          b.        4          c.         error                d.        1
37-What is the output ?
void main(){
const int i;    int k=10;   i=100;     k=++k + i;    printf("%d",k);    }
a.         111      b.         error                c.         112      d.        None
38-What is the output ?
#define   printifless(x,y)   if(x
void main(){
int i=2,k=1;
if(i>0 && k>0)
printifless(i,k);
else                
printf("A"); }
a.         A         b.         nothing            c.         error                d.        2
39-What is the output ?
void main(){
int a=10,b=20,c=30,d=40;
if(a,b,c,d)
printf("Hello"); }
a.         Hello    b.        error    c.        warning           d.        Hello10203040
40-What is the output?
main(){
int i=100,j=10,k;
int *p=&j;     k=i/*p;
printf("%d",k);}
a.         10        b.         error    c.        warning          d.         1
41-What is the output?
   main(){
    extern  int  i ;    i=20;    printf("%d",i);}
a.         compile error   b.        runtime error   c.        linker error      d.        20
42-What is the output ?
main(){
  int i=-1 ,j=-1,k=0,l=2,m;         
  m=i++ && j++ && k++ || l++;
  printf("%d %d %d %d %d",i,j,k,l,m);}
a.         error   b.        0 0 1 3 1         c.        0 0 1 3 2          d.         warning
43-      main(){
            static  int i;
            switch(i)             {
                default:printf("garbage");
                case 0: printf("Zero"); break;
 case 1:printf("one"); break;
              case 2: printf("two"); break;              }  }
a.         error   b.        zero    c.        garbage zero              d.         zero grabage
44-What is output ?
  main(){           
   printf("%x",-1
a.         ff00      b.         ffff        c.         240      d.         None
//45-What is output ?
main(){int  i=5;    printf("%d%d%d%d%d",i++,i--,++i,--i,i);  }
a.         54554             b.        45545              c.         54454              d.         45445
46-.What is the output ?
#define square(x)   x*x
main(){
int i;
i = 64/square(4);
printf("%d",i);}
a.         16        b.        64        c.         4          d.         error
47-Size of structure can be determined by
1-sizeof(variablename)            2-sizeof(struct tag)
a.         only 1              b.         only 2             c.         both 1 & 2       d.        none
48-What is the output ?
 main(){
printf("%p",main);}
a.         some address               b.         undefined symbol error                       c.        0xfa                 d.         None
49-#define   int   char
main(){
 int i=65;
 printf("%d",sizeof(i));}
a.         error    b.        1          c.         2          d.         0
50-What is the output ?
main(){
  char string[]="Hello World";
 display(string);}
void display(char *string){        
   printf("%s",string);}
a.         "Hello World" b.         Hellow World               c.         error                d.         warning & Hello World

Love - from a different angle


Once there was a  tree .It was very big and had
so many branches, fruits and flowers .A boy used to
play near the tree . Though the tree was very big ,The tree
loved the small boy very much . U can love only when
u forget that u r very big .If u insist that u r something
u cannot love .The tree was unaware of its hugeness so it
could love that small child.
The branch of the tree were very high but the tree
lowered its branches so that the boy could catch it and
swing on it .And remember only LOVE can come down
without thinking about its ego. Every day the boy used to
come ,sleep under the tree ,play and swing on it branches.
The tree was filled with great joy when the boy used to
come .
But as the boy grew up he very rarely visited the
tree . Everyday the tree longed for the boy .One day the boy
was passing by the tree . The tree called the boy and
asked him "Why don't u visit me everyday as u used to
come in childhood and play under my shade" . The boy replied
"Don't talk in a childish  way .Now i am a grown up man .
Now i don't find any happiness in u .In today's world
happiness lies in Money .If u can give me money i can
come to u everyday " . This is the difference :-the ego
always ask for something and love is always ready to sacrifice.
The ego will only come to u if u can give something to it.
The tree replied "We don't keep money as u human beings do.
Money is just a small piece of paper for us . Yes we keep love instead
of money we can give u that in abundance.Even then if u r not
satisfied then there are so many fruits and flowers on me.
U can take them if u want and sell in the market and make
money . But remember do visit me again"The boy quickly
climbed the tree and took all the fruits and flowers from
the tree and without even thanking the tree went to the
market to make the money.
Even then the tree was happy thinking that it was able
to help the boy in making money.Love always feels happiness
when it can share something which it has .
Days passed . The boy was never seen . The tree was
longing for boy's visit .One day the boy came to the tree
with a sad face . The tree asked him "what is the matter ?" . The
boy replied that "He need to make a house and he has no
money to buy it." The tree replied "U can cut my branches
and make a beautiful house from my wood." The boy was very
happy .He quickly brought the axe and cut the branches of the tree
and prepared a beautiful house from it .Again the tree was
very happy that it was able to help its love.
After so many days , the boy again came to the tree and asked
"if u can give me ur trunk so that i can prepare a boat
and go overseas with my family ." The tree agreed .The boy
cut its trunk and prepared a boat from it.Then he never came
back. Even then the tree used to think that the boy might not
have been drowned in the sea . It used to ask boy's friends
if they can bring some news about the boy .The tree became old
and week but still it wanted to know whether the boy was
happy or Not.


Unfortunately , this is the end of the story .U might be
thinking that I have done injustice to the tree by
making this story a tragedy . But in real life also the same thing
happens more frequently  .It is very rare that the person
whom u love , loves u back .But even then I don't think
that by loving someone who betrays u or does not love u back
is waste of time .It requires great courage to love someone who
does NOT love u back in return and only the most courageous people can
do that . And i am not talking about impractical things .
Jesus did it .Socrates did it .Gautam Buddha and Mahavir did it.

Love is not a business . In business ,u give something and
expect something in return .But
in love u cant do that .Otherwise ur love is just a
material thing just like business. Spiritual Love never
expects anything in return.

-I wish such type of LOVE develop in all of us.

With Love to all my Frnds ,
Raithatha Yash
Director of Aspire Institute