In the following code, the P2 is Integer Pointer or Integer?
typedef int *ptr;
ptr pp
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}
Is the following declaration acceptable?
typedef long no, *ptrtono;
no n;
ptrtono p;
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 ssIn 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;
}
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;
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.
In the following code what is 'P'?
typedef char *charp;
const charp P;
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
}
Point out the error in the following code?
typedef struct
{
int data;
NODEPTR link;
}*NODEPTR;
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}
What is x in the following program?
#include<stdio.h>
int main()
{
typedef char (*(*arrfptr[3])())[10];
arrfptr x;
return}
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
}
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
}