Q.1.

In the following code, the P2 is Integer Pointer or Integer?

typedef int *ptr;
ptr pp
Q.2.

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}
Q.3.

Is the following declaration acceptable?

typedef long no, *ptrtono;
no n;
ptrtono p;
Q.4.

Is there any difference in the #define and typedef in the following code?

typedef char * string_t;
#define string_d char *;
string_t ssstring_d ss
Q.5.

In the following code snippet can we declare a new typedef named ptr even though struct employee has not been completely declared while using typedef?

typedef struct employee *ptr;
struct employee
{
    char name[20];
    int age;
    ptr next;
}
Q.6.

Are the properties of i, j and x, y in the following program same?

typedef unsigned long int uli;
uli i, j;
unsigned long int x, y;
Q.7.

typedef's have the advantage that they obey scope rules, that is they can be declared local to a function or a block whereas #define's always have a global effect.

Q.8.

In the following code what is 'P'?

typedef char *charp;
const charp P;
Q.9.

What will be the output of the program?

#include<stdio.h>

int main()
{
    typedef int arr[5];
    arr iarr = {5};
    int i;
    for(i=i<i++)
        printf("%d,", iarr[i]);
    return
}
Q.10.

Point out the error in the following code?

typedef struct
{
    int data;
    NODEPTR link;
}*NODEPTR;
Q.11.

What will be the output of the program?

#include<stdio.h>

int main()
{
    typedef float f;
    static f *fptr;
    float fval =    fptr = &fval;
    printf("%f\n", *fptr);
    return}
Q.12.

What is x in the following program?

#include<stdio.h>

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

What will be the output of the program?

#include<stdio.h>

int main()
{
    typedef int LONG;
    LONG a=
    LONG b=
    float c=
    c=b;
    b+=a;
    printf("%d,", b);
    printf("%f\n", c);
    return
}
Q.14.

What will be the output of the program?

#include<stdio.h>

typedef struct error {int warning, err, exception;} ERROR;
int main()
{
    ERROR e;
    e.err=
    printf("%d\n", e.err);
    return
}