Home »» Placement Papers »» All Papers »» CDAC »» Placement Paper

CDAC PAPER - APR 2004


Fundamentals of Programming
           
            27 The programming language that was designed for specifying algorithm
            Address
            ASCII
            ALGOL
            None of these options
           
28 _____ contains the addresses of all the records according to the contents of the field designed as the record key.
            Index     <------ans 
            Subscript
            Array
            File
           
            29 _________ symbol is used for Processing of data.
            Oval
            Parallelogram         <------ans
            Rectangle 
            Diamond
           
            30 __________ is the analysis tool used for planning program logic
            Protocol
            None of these options
            PROLOG
            Pseudocode
           
            31 Machine language has two part format the first part is__________ and the second part is __________
            OPCODE,OPERAND<------ans
            OPERAND,OPCODE 
            DATA CODE,OPERAND
            OPERAND,CODEOP
           
            32 Language Primarily used for internet-based applications
            ADA
            C++
            JAVA                      <------ans
            FORTRAN
           
            33 _________ is a point at which the debugger stops during program execution and awaits a further command.
            Memory Dump
            Watch point                      <------ans
            Break point
            None of these options
           
            34 ________do not contain any program logic and are ignored by the language processor.
            Protocol
            Virus
            Comment
            None of these options
           
            35 The component of data base management system is ________
            Data definition Language
            Data manipulation Language
            Data definition Language and Data manipulation Language
            None of these options
           
            36 The quality of Algorithm is judged on the basis of_________
            Time requirement
            Memory Requirement
            Accuracy of solution
            All of these options                              <------ans
           
            37 Advantages of using flow charts is
            Effective Analysis
            Efficient Coding
            Time consuming
            Effective Analysis and Efficient Coding                <------ans

 Programming in C
           
            38 The Real constants in C can be expressed in which of the following forms
            Fractional form only
            Exponential form only
            ASCII form only
            Both Fractional and Exponential forms<------ans
           
            39 The program, which translates high-level program into its equivalent machine language program, is called
            Transformer
            Language processor
            Converter
            None of these options<------ans
           
            40 Consider the following statements.
            i.Multiplication associates left to right
            ii.Division associates left to right
            iii.Unary Minus associates right to left
            iv.subtraction associates left to right
            All are true<------ans
            only i and ii are true
            all are false
            only iii and iv are true
           
            41 What will be the value of variable a in the following code?
            unsigned char a;
            a = 0xFF + 1;
            printf("%d", a);
            0xFF 
            0x100
            0        <------ans 
            0x0
           
            42 What is the output of the following program ?
            #include <stdio.h>
            void main()
            {
            printf(" 10!=9 : %5d",10!=9);
            }
            1   <------ans 
            0
            Error
            None of these options
           
            43 #include<stdio.h>
            void main()
            {
            int x=10;
            (x<0)?(int a =100):(int a =1000);
            printf(" %d",a);
            }
            Error    <------ans 
            1000
            100
            None of these options
           
            44 Which of the following shows the correct hierarchy of arithmetic operations in C
            (), **, * or /, + or -
            (), **, *, /, +, -
            (), **, /, *, +, -
            (), / or *, - or + <------ans 
           
            45 What is the output of the following code?
            #include<stdio.h>
            void main()
            {
            int a=14;
            a += 7;
            a -= 5;
            a *= 7;
            printf(" %d",a);
            }
            112     <------ans 
            98
            89
            None of these options
           
            46 What is the output of the following code?
            #include<stdio.h>
            #define T t
            void main()
            {
   char T = 'T';
   printf(" %c %c ",T, t); 
            } 
            Error
            T t
            T T    <------ans.I did'nt get d correct ans
            t t
           
            47 The statement that prints out the character set from A-Z, is
            for( a = 'z'; a < 'a'; a = a - 1)
            printf("%c", &a);
            for( a = 'a'; a <= 'z'; a = a + 1)
            printf("%c", &a);
            for( a = 'A'; a <= 'Z'; a = a + 1)   <-----ans 
            printf("%c", a);
            for( a = 'Z'; a <= 'A'; a = a + 1)
            printf("%c", a);
           
            48 The statement which prints out the values 1 to 10 on separate lines, is
            for( count = 1; count <= 10; count = count + 1) printf("%d ", count);
            for( count = 1; count < 10; count = count + 1) printf("%d ", count);<------ans
            for( count = 0; count <= 9; count = count + 1) printf("%d ", count); 
            for( count = 1; count <> 10; count = count + 1) printf("%d ", count);
           
            49 What does the term 'call-by-reference' refer to?
            Passing a copy of a variable into a function.
            Passing a pointer to a variable into a function. <------ans
            Choosing a random value for a variable.
            A function that does not return any values.
           
            50 What is the output of the following code?
            #include<stdio.h>
            void swap(int&, int&);
            void main()
            {
   int a = 10,b=20;
   swap (a++,b++);
   printf(" %d %d ",a, b);
            }
            void swap(int& x, int& y)
            {
   x+=2;
   y+=3;
            }
            14, 24
            11, 21   <------ans 
            10, 20
            Error
           
            51 What is the output of the following program code
            #include<stdio.h>
            void abc(int a[])
            {
            a++;
            a[1]=612;
            }
            main()
            {
            char a[5];
            abc(a);
            printf("%d",a[4]);
            }
            100
            612
            Error                <------ans 
            None of these options
           
            52 which of the following is true about recursive function
            i. it is also called circular definition
            ii. it occurs when a function calls another function more than once
            iii. it occurs when a statement within the function calls the function itself
            iv. a recursive function cannot have a return statement within it"
            i and iii<------ans
            i and ii
            ii and iv
            i, iii and iv
           
            53 What will happen if you assign a value to an element of an array whose subscript exceeds the size of the array?
            The element will be set to 0
            Nothing, its done all the time
            Other data may be overwritten
            Error message from the compiler
           
            54 What is the output of the following code?
            #include<stdio.h>
            void main()
            {
            int arr[2][3][2]={{{2,4},{7,8},{3,4},}, {{2,2},{2,3},{3,4}, }};
            printf(" %d",**(*arr+1)+2+7);
            }
            16        <------ans
            7
            11
            Error
           
55 If int s[5] is a one dimensional array of integers, which of the following refers to the third element in the array?
            *( s + 2 )          <------ans
            *( s + 3 )
            s + 3
            s + 2
           
            57 #include"stdio.h"
            main()
            {
            int *p1,i=25;
            void *p2;
            p1=&i;
            p2=&i;
            p1=p2;
            p2=p1;
            printf("%d",i);
            }
            The output of the above code is :
            Program will not compile     <------ans
            25
            Garbage value
            Address of I
           
            58 What is the output of the following code ?
            void main()
            {
            int i = 100, j = 200;
            const int *p=&i;
            p = &j;
            printf("%d",*p);
            }
            100
            200                   <------ans
            300
            None of the above
           
            59 void main()
            {
            int i=3;
            int *j=&i;
            clrscr();
            printf("%d%d",++*j,*(&i));
            }
            What is the output of this program?
            3 3
            4 3                    <------ans
            4,address of i printed
            Error:Lvalue required
           
            60 What is the output of the following code?
            #include<stdio.h>
            void main()
            {
            int arr[] = {10,20,30,40,50};
            int *ptr = arr;
            printf("  %d %d ",*ptr++,*ptr);
            }
            10 20
            10 10                <------ans
            20 20
            20 10
           
            61 Which of these are reasons for using pointers?
            1.To manipulate parts of an array
            2.To refer to keywords such as for and if
            3.To return more than one value from a function
            4.To refer to particular programs more conveniently
            1 & 3                 <------ans
            Only 1
            Only 3
            All of the above
           
            62 struct num
            {
            int no;
            char name[25];
            };
            void main()
            {
            struct num n1[]={{25,"rose"},{20,"gulmohar"},{8,"geranium"},{11,"dahalia"}};
            printf("%d%d" ,n1[2].no,(*&n1+2)->no+1);
            }
            What is the output of this program?
            8 8
            8 9              <------ans 
            9 8
            8 , unpredictable
           
            63 During initializing a union
            Only one member can be initialised.
            All the members will be initialised.
            Initialisation of a union is not possible.<------ans
            None of these options
           
            64 Self referential structure is one
            a. Consisting the structure in the parent structure
            b. Consisting the pointer of the structure in the parent structure
            Only a
            Only b
            Both a and b
            Neither a nor b
           
            65 Individual structure member can be initialized in the structure itself
            True
            False
            Compiler dependent
            None of these options
           
            66 Which of the following is the feature of stack?
            All operations are at one end
            It cannot reuse its memory
            All elements are of different data types
            Any element can be accessed from it directly<------ans<------ans
           
            67 When stacks are created
            Are initially empty<------ans
            Are initialized to zero
            Are considered full
            None of these options
           
            68 What is time required to insert an element in a stack with linked implementation?
            O(1)
            O(log2n)<------ans<------ans
            O(n)
            O(n log2n)
           
            69 Which of the following is the feature of stack?
            All operations are at one end
            It cannot reuse its memory
            All elements are of different data types
            Any element can be accessed from it directly<------ans
           
            70 Time taken for addition of element in queue is
            O(1)
            O(n)
            O(log n)<------ans
            None of these options
           
            71 When is linear queue said to be empty ?
            Front==rear
            Front=rear-1
            Front=rear+1
            Front=rear<------ans
           
            72 When queues are created
            Are initially empty<------ans
            Are initialized to zero
            Are considered full
            None of the above
           
            73 What would be the output of the following program?
            #include <stdio.h>
            main()
            {
            printf(" %c", "abcdefgh"[4]);
            }
            abcdefgh
            d
            e                <------ans
            error
           
74 Select the correct C code which will read a line of characters (terminated by a ) from input_file into a character array called buffer. 
            NULL terminate the buffer upon reading a  .
int ch, loop = 0; ch = fgetc( input_file ); while( (ch != ' ') && (ch != EOF) ) { buffer[loop] = ch; loop++; ch = fgetc( input_file ); } buffer[loop]= NULL;
int ch, loop = 0; ch = fgetc( input_file ); while( (ch = " ") && (ch = EOF) ) { buffer[loop] = ch; loop--; ch = fgetc( input_file ); } buffer[loop] = NULL;
int ch, loop = 0; ch = fgetc( input_file ); while( (ch <> " ") && (ch != EOF) ) { buffer[loop] = ch; loop++; ch = fgetc( input_file ); } buffer[loop] = -1;
            None of the above
           
            75 What is the output of the following code ?
            void main()
            {
            int a=0;
            int b=0;
            ++a == 0 || ++b == 11;
            printf(" %d,%d",a,b);
            }
            0, 1
            1, 1           <------ans 
            0, 0
            1, 0
           
            76 What is the output of the following program?
            #define str(x)#x
            #define Xstr(x)str(x)
            #define oper multiply
            void main()
            {
            char *opername=Xstr(oper);
            printf("%s",opername);
            }
            opername
            Xstr
            multiply          <------ans 
            Xstr
           
            77 What is the output of the following code ?
            #include<stdio.h>
            #include<string.h>
            void main()
            {
            char *a = "C-DAC

             OO Programming Concepts
           
88 The ability to reuse objects already defined, perhaps for a different purpose, with modification appropriate to the new purpose, is referred to as Information hiding.
            Inheritance.
            Redefinition.
            Overloading
           
89 The term given to the process of hiding all the details of an object that do not contribute to its essential characteristics is called _______.
            data-hiding
            packaging
            encapsulation
            abstraction
           
90 Object-oriented technology's ____ feature means that a small change in user requirements should not require large changes to be made to the system.
            Abstraction
            Modularity
            Encapsulation
            Modelling
           
            91 An object has _____.
            State
            Behaviour
            Identity.
            All of these options.
           
            92 Which of the following is true:
            Class is an object of an object.
            Class is meta class.
            Class cannot have zero instances.
            None of these options.
           
93 If a derived class object is explicitly destroyed by applying the delete operator to a base-class pointer to the object, the _____ function is automatically called on the object
            Derived-class destructor.
            Base-class destructor.
            Base-class constructor.
            Derived-class constructor.
           
            94 In object orientated programming a class of objects can _____________ 
            properties from another class of objects
            utilize
            borrow
            inherit
            adapt
           
            95 Contracts are not meant to be used in cases of _______.
            Composition.
'has-a' relationship.
'is-a' relationship.
            Both Composition and 'has-a' relationship.
           
            96 Inheritance through interface is called ________
            Implementation inheritance.
            Definition inheritance.
            Delegation inheritance.
            Interface inheritance model.
           
            97 When a class uses dynamic memory, what member functions should be provided by the class?
            An overloaded assignment operator.
            The copy constructor.
            A destructor.
            All of these optionsq
           
            98 ______ means that both the data and the methods which may access it are defined together in the same unit.
            Data hiding.
            Encapsulation
            Data Binding
            None of these options
           
99 The term given to the process of hiding all the details of an object that do not contribute to its essential characteristics is called _____________.
            data-hiding.
            packaging.
            encapsulation.
            grouping
           
            100 Car contains a steering wheel is example of ________
            Composition
            Association
            Composition and Association
            None of these options
           
            101 Can two classes contain member functions with the same name?
            No.
            Yes, but only if the two classes have the same name.
            Yes, but only if the main program does not declare both kinds.
            Yes, this is always allowed.
           
            102 A contract is implemented through.
            Class
            Interface.
            Abstract Class.
            Interface and Abstract Class

English Language Ability
           
Directions:- The given pair of words contains a specific relationship to each other. Select the best pair of choices which expresses the same relationship as the given.
           
            103 IGNOMINY : DISLOYALTY ::
            fame : heroism
            death : victory
            derelict : fool
            martyr : man
           
            104 EXPLOSION : DEBRIS ::
            flood : water
            famine : food
            fire : ashes
            disease : germ
           
            105 Bland : Piquant ::
            inane : relevant
            charlatan : genuine
            slavish : servile
            terse : serious
           
            106 NEGLIGENT : REQUIREMENT ::
            remiss : duty
            cogent :argument
            easy : hard
            careful : position
           
            Directions:-  Choose the best word, which is most opposite in the meaning to the given word.
           
            107 FETTER :
            delay
            stretch
            comply
            thrive
           
            108 SEDULOUS :
            rampant
            esoteric
            morose
            indolent
           
            109 SUCCULENT :
            ordinary
            tasteless
            inexpensive
            invigorating
           
            110 DORMANT :
            authoritative
            elastic
            active
            uninteresting
           
            111 COURT :
            reject
            uncover
            infect
            subject
           
Directions:- The given pair of words contains a specific relationship to each other. Select the best pair of choices which expresses the same relationship as the given.
           
            112 INTIMIDATE : FEAR ::
            Maintain : satisfaction
            Astonish : wonder
            Soothe : concern
            Lion : tame
           
            Directions:-  Pick out the best choice which can complete the incomplete stem correctly and meaningfully
           
113 It was an extremely pleasant surprise for the hutment-dweller when the Government officials told him that__________
            he had to vacate hutment which he had been unauthorized occupying
            he had been gifted with a furnished apartment in a multistoried building
            he would be arrested for wrongly encroaching on the pavement outside his dwelling
            they would not accede to his request

114 In the closing days of the civil War, President Abraham Lincoln was planning to graciously welcome the defeated confederate states back into the
Union. After Lincoln was assassinated, however, the "Radical Republicans" in Congress imposed martial law in the South, creating resentment that caused problems well into this century. Had Lincoln lived, the history of regional conflict in 20th century America would have been considerably different. All of the following assumptions underline the argument above EXCEPT 
The imposition of martial law in the South was primarily responsible for the resentment felt in the South
Had he lived, lincoln would have treated hte defeated South as he had planned Lincoln would have been able to prevent the Radical Republicans in Congress from imposing martial law in the South 
Factors other than the imposition of martial law in the South affected the history of regional conflicts in 20th century America
           
115 A politician wrote the following: "I realize there are shortcomings to the questionaire method. However, since I send a copy of the quetionnaire to every home in the district, I believe the results are quite representative.... I think the numbers received are so large that it is quite accurate even though the survey is not done scientifically" Most people who received the questionnaire have replied
Most people in the district live in homes. the questionnaire method of data collection is unscientific. A large, absolute number of replies is synonymous with accuracy
           
116 A worldwide ban on the production of certain ozone-destroying chemicals would provide only an illusion of protection. Quantities of such chemicals, already produced, exist as coolants in millions of refrigerators. When they reach the ozone layer in the atmosphere, their action cannot be halted. So there is no way to prevent these chemicals from damaging the ozone layer further. Which of the following, if true, most seriously weakens the argument above?
It is impossible to measure with accuracy the quantity of ozone-destroying chemicals that exist as coolants in refrigerators.
In modern societies, refrigeration of food is necessary to prevent unhealthy and potentially life-threatening conditions.
Even if people should give up the use of refrigerators, the coolants already in existing refrigerators are a threat to atmospheric ozone.
            The coolants in refrigerators can be fully recovered at the end of the useful life of the refrigerators and reused.
           
117 Every town with a pool hall has its share of unsavory characters. This is because the pool hall attracts gamblers and all gamblers are unsavory. Which of the following, if true cannot be inferred from the above?
            All gamblers are unsavory.
            All pool halls attract gamblers.
            Every town has unsavory characters.
            All gamblers are attracted by pool halls.
           
Directions:- The workweek in a small business is a five-day workweek running from Monday through Friday. In each workweek, activities L,M,N,O and P must all be done.The work is subject to the following restrictions:
           
            L must be done earlier in the week than O and earlier than P
            M must be done earlier in the week than N and earlier than O
            No more than one of the activities can ever be done on any one day
           
            118 Which of the following is an acceptable schedule starting from Mon

Comment

0 Answers