Click Here to Get Worlds Smallest Email Id (Better than Gmail & Yahoo!)

JobsAssist.com - Jobs Resources & Placement Papers
Get Vyom Interview Success Kit Now!
» Now 9,000 Questions & Answers !!
» 10,000+ Pages | Written by 58 Subject Experts | 81 Question Categories
» Every Successful Candidate has this!
Special

Get Salary before getting a Job!
Click here


Main Menu

JobsAssist.com Home Home
 Freshers Jobs Freshers Jobs
Latest Freshers Jobs Latest Jobs
Add Freshers Jobs to My Yahoo My Yahoo!
Free Vyom Career Magazine Free Career Mag
 IT Companies Placement Papers IT Placement Papers
 Govt. Sector Companies Placement Papers Govt. Sector Papers
 5000 IT Companies Directory IT Directory
 Free Magazines Free Magazines
 Consultants Directory Consultants
 Training Institutes Directory Training Inst.
 Interview Questions Interview Questions
 Motivational Quotes Motivational Quotes
 Call Center Information Call Center Info
 Final Year Projects Final Year Projects
 Jobs Discussion Forums Jobs Forum
 Vyom Resume Submitter Resume Submitter
 Free Resume Builder Downloads Free Resume Builders
 Contact Us Contact Us


Resume Submitter

Vyom Network
    Vyom Resources
    Source Codes
    Online Exams
    Discussions World
    Free eBooks
    20,000 Downloads

HOT Resources
Free Career eMagazine

  Advertise for FREE!

HOT eBook

Search JobsAssist.com
Google



Your Ad Here

Welcome to JobsAssist.com - Single Stop for Complete Career Resources


Home » Placement Papers » Aditi Placement Papers » Aditi Placement Paper 7

Join VYOM-JOBS and receive latest 2008 Placement Papers for FREE


Aditi Placement Paper 7


Error icon Receive Genuine Job Information & latest Walk-in details in your mailbox everyday! Join our Yahoo! Group by entering your email in the form below:


Search Jobs:
(For Example: Software Testing Jobs, BPO Jobs, J2EE Jobs, etc.)
Click here to register on India's Fastest growing Job site.

ADITI-Placement Paper
 
 
         C & C++ Technical Question
  1. What would be the output of the following program.
    #include<stdio.h>
    main()
     {
      extern int a; 
      printf("%d",a);;
     }
      int a=20;
      (a) 20   (b) 0   (c) garbage value   (d) error!!

  2. What would be the output of the following program.
    main()
      {
       int a[5]={2,3};
       printf("\n %d %d %d",a[2],a[3],a[4]);
       }
      (a) garbage value   (b) 2   3   3   (c) 3   2   2   (d) 0   0   0

  3. What would be the output of the following program.
    main()
    {
      inti=-3,j=2,k=0,m;
      m=++i&&++j||++k;
      printf("\n %d %d %d %d",i,j,k,m);
    }
    (a) -2   3   0   1   (b) -3   2   0   1   (c) -2   3   1   1   (d) error

  4. What would be the output of the following program.
    main()
    {
      int a,b;
      a=sumdig(123); 
      b=sumdig(123);
      printf("%d %d",a,b);
    }
    sumdig(int n)
      {
      static int s=0;
      int d;
      if(n!=0)
       {
       d=n%10;
       n=(n-d)/10;
       s=s+d;
       sumdig(n);
       }
    else return(s);
      }
       (a) 12 6   (b) 6 12   (c) 3 15   (d) error

  5. What would be the output of the following program.
     #define CUBE(x) (x*x*x)
    main()
     {
       int a,b=3;
       a=CUBE(b++);
       printf("\n %d %d",a,b); 
     }
      (a) 64 4  (b) 27 4  (c) 27 6  (d) 64 6

  6. What would be the output of the following program.
     main()
      { 
       const int x=get();
       printf("%d",x);
      }
      get()
       {
        return(20);
       }
       (a) 20    (b) garbage value   (c) error   (d) 0

  7. A function has this prototype void f1(int **x), How will you call this function?
     (a) int **a;       (b) int a;      (c) int *a;       (d) int a=5;
      f1(a); f1(&a); f1(&a); f1(&&a);  

  8. pointout the error, if any, in the for loop
      main()
      {
       int l=1;
       for(;;)
        {
         printf("%d",l++); 
         if(l>10)
         break;
       }
     }
       (a) The condition in the for loop is a must     (b) The two semicolons should be droppe  (c) The for loop should be replaced by awhile loop    (d) No error

  9. Can the following piece of code be executed?
    int main(void)
      {
       char strA[10]="compile",strB[10];
       my_strcpy(strB,strA);
       puts(strB);
      }
    char * my_strcpy(char *destination,char *source)
      {
        char *p=destination;
        while(*source!='\0')
         {
        *p++=*source++;
        }
          *p='\0';
           return destination;
       }
       (a) Compilation will only give a warning but will proceed to execute & will display "compile"
       (b) The compilation error char *(char *,char *) differs in levels of indirection from 'int()' will occur
       (c) Yes & it will print compile on the screen    (d) None of the above

  10. What would be the output of the following program.
    #include<stdio.h>
    main()
      {
      char str[5]="fast";
      static char *ptr_to_array = str; 
      printf("%s",ptr_to_array);
     } 
       (a) Compilation will only give a warning but will proceed to execute & will display "fast"
       (b) display "fast" on screen  (c) will give a compilation error (d) none of the above

  11. What would be the output of the following program.
     main()
     {
       int num,*p;
       num=5;
       p=&num;
       printf("%d",*p);
     }
     (a) 6 (b) 5 (c) junk value (d) compilation error

  12. What would be the output of the following program.
      main()
       {
        int a[3]={2,3,4};
        char *p;
        p=a;
        p=(char *)((int *)p+1);
        printf("%d",p);
       }
    (a) 2 (b) 0 (c) junk value (d) 3

  13. What would be the output of the following program.
     main()
      {
       int i=10;
       fn(i);
       printf("%d",i); 
      }
     fn(int i)
        {
      return ++i;
       }
    (a) 10 (b) 11         (c) 12 (d) Compilation error

  14. What will be the value of i & j after the loop isexecuted?
      for(i=0,j=0;i<5,j<25;i++,j++)
       (a) i=4,j= 24    (b) i=24,j= 24    (c) i=25,j= 25       (d) i=5,j=25

  15. What would be the output of the following program.
     main()
      {
      int i,j;
      i=10;
      j=sizeof(++i);
      printf("%d",i);
     }
      (a) 11  (b) 10 (c) 4 (d) compilation error

  16. What would be the output of the following program.
     main()
      {
       int i=7;
       printf("%d\n",i++*i++);
      }
      (a) 49 (b) 56 (c) 72 (d) compilation error

  17. What will the printf print?
    main()
     {
      char *p,*f();
      p=f();
      printf("f() returns:%s\n",p);
    }
    char *f() 
     {
      char result[80];
      strcpy(result,"anything will do");
      return (result);
    }
    (a) f() returns: anything will do    (b) f() returns:
    (c) compilation error    (d) The printf statement is not going to be executed

  18. How many times the following program would print 'Jamboree'?
     main()
      {
      printf("\n Jamboree");
      main();
     }
    (a) infinite number of times    (b) 32767 times (c) 65535 times    (d) till the stack does not overflow

  19. Notice the error in the default statement in the code snippet below.Will it give a compilation error?
    main()
      {
      int a=10,j;
      j=fn(a);
      switch(j)
        {
       case 30: printf("the value is 30");
       break;
       case 50: printf("the value is 50");
        break;
        default:printf("the value is not 30 or 50");
        }
      }
       fn(int a)
        {
         return (++a);
        }
             
    (a) Will display "the value is 30"     (b) Will display "The value is not 30 or 50"  (c) Yes a compilation error would happen
       (d) No compilation errors but there will be no output on the screen

  20. What would be the output of the following program. 
    main()
     {
       struct emp
      {
        char name[20];
        int age;
        float sal;
      };
        struct emp e = {"tiger"}; 
        printf("\n %d %f",e.age,e.sal);
    }
    (a) 0 0.000000   (b) Garbage values (c) Error (d) none of the above

Join VYOM-JOBS and receive latest 2008 Placement Papers for FREE
Click here to register on India's Fastest growing Job site

Vyom Network     Privacy Policy

JobsAssist.com is a part of Vyom Network.

Vyom Network : Free SMS, GRE, GMAT, MBA | Online Exams | Freshers Jobs | Software Downloads | Programming & Source Codes | Delhi Info | Jobs, Discussions | Placement Papers | Free eBooks | Free eBooks | Free Business Info | Interview Questions | Free Tutorials | Arabic, French, German | IAS Preparation | Jokes, Songs, Fun | Free Classifieds | Free Recipes | Free Downloads | Bangalore Info | Tech Solutions | Project Outsourcing, Web Hosting | GATE Preparation | MBA Preparation | SAP Info | Software Testing


Placement Papers
Copyright ©2003-2010 Vyom Technologies, All Rights Reserved.
Page URL: http://www.jobsassist.com/placementpapers/aditi-placement-paper-7.asp

Download Yahoo Messenger | Job Interview Questions | Software Testing Tutorials | Winrunner Tutorial | Test Director Tutorial | C++ Projects