image not found

Oops! That page can't be found.


Directions to Solve

Which of phrases given below each sentence should replace the phrase printed in bold type to make the grammatically correct? If the sentence is correct as it is, mark 'E' as the answer.

Q1: If I would have realised the nature of job earlier, I would not have accepted it.

A No correction required

B If I have had

C In case I would have

D Had I

E Had I been

Q2:
Point out the error in the following program.
#include<stdio.h>
int main()
{
    int (*p)() = fun;
    (*p)();
    return 0;
}
int fun()
{
    printf('AptitudeCrack.com\n');
    return 0;
}

A None of these

B No error

C
Error: fun() prototype not defined

D
Error: in int(*p)() = fun;

Q3: Does there exist any way to make the command-line arguments available to other functions without passing them as arguments to the function?

A No

B Yes

Q4: In the following code, the P2 is Integer Pointer or Integer?
typedef int *ptr;
ptr p1, p2;

A Integer pointer

B Error in declaration

C None of above

D Integer

Q5: In the following code what is 'P'?
typedef char *charp;
const charp P;

A P is a character constant

B P is a constant

C P is character type

D None of above

Q6: What is x in the following program?
#include<stdio.h>

int main()
{
    typedef char (*(*arrfptr[3])())[10];
    arrfptr x;
    return 0;
}

A x is an array of three function pointers

B x is an array of three pointer

C Error in x declaration

D x is a pointer

Q7: What will be the output of the program?
#include<stdio.h>

int main()
{
    enum color{red, green, blue};
    typedef enum color mycolor;
    mycolor m = red;
    printf('%d', m);
    return 0;
}

A 0

B 1

C 2

D red

Q8: What will be the output of the program?
#include<stdio.h>

int main()
{
    typedef int arr[5];
    arr iarr = {1, 2, 3, 4, 5};
    int i;
    for(i=0; i<4; i++)
        printf('%d,', iarr[i]);
    return 0;
}

A No output

B Error: Cannot use typedef with an array

C 1, 2, 3, 4, 5

D 1, 2, 3, 4

Q9: What will be the output of the program?
#include<stdio.h>

int main()
{
    typedef int LONG;
    LONG a=4;
    LONG b=68;
    float c=0;
    c=b;
    b+=a;
    printf('%d,', b);
    printf('%f\n', c);
    return 0;
}

A 68.000000, 72.000000

B 68, 72.000000

C 72, 68.000000

D 72.000000, 68

Q10: What will be the output of the program?
#include<stdio.h>

int main()
{
    typedef float f;
    static f *fptr;
    float fval = 90;
    fptr = &fval;
    printf('%f\n', *fptr);
    return 0;
}

A 9

B 0

C 90

D 90.000000