INTERVIEW-TECHNICAL PAPERS 

C Programming PAPERS

Index Main C Programming 1 C Programming 2 C Programming 3 C Programming 4 C Programming 5 Lets Take Break - BMW Specials

 



 




 


Find the output for the following C program

hudihudi.com

31) #include<stdio.h>
main()
{
char *p1;
char *p2;
p1=(char *) malloc(25);
p2=(char *) malloc(25);
strcpy(p1,"Ramco");
strcpy(p2,"Systems");
strcat(p1,p2);
hudihudi.com
printf("%s",p1);
}

 Ans. RamcoSystems

32.  Find the output for the following C program given that
[1]. The following variable is available in file1.c
static int average_float;
hudihudi.com

Ans. All the functions in the file1.c can access the variable

hudihudi.com
33.  Find the output for the following C program

# define TRUE 0
some code
while(TRUE)
{
some code
}
hudihudi.com

Ans. This won't go into the loop as TRUE is defined as 0

34. struct list{
       int x;
      struct list *next;
      }*head;

        the struct head.x =100

       Is the above assignment to pointer is correct or wrong ?

Ans. Wrong hudihudi (dot)com

35.What is the output of the following ?

      int i;
      i=1;
      i=i+2*i++;
      printf(%d,i);

Ans. 4

                                                      
                                                    Back to top
 

 

 

Google
 
Web www.hudihudi.com



   

Any suggestions/ads/comments/question paper submissions please email to submit (at) hudihudi.(dot)com

www.hudihudi.com

Copyright © www.hudihudi.com