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: The crime has growth rapidly in Russia since the disintegration of the communist system.

A crimes grow rapidly

B crimes have been rapidly grown

C rapid crime has grown

D crime has grown rapidly

E No correction required

Q2: Which of the declaration is correct?

A int long;

B float double;

C char int;

D int length;

Q3: Point out the error in the following code?
typedef struct
{
    int data;
    NODEPTR link;
}*NODEPTR;

A Error: typedef cannot be used until it is defined

B Error: in *NODEPTR

C No error

D None of above

Q4: Is the following declaration acceptable?
typedef long no, *ptrtono;
no n;
ptrtono p;

A NO

B Yes

Q5: Is there any difference in the #define and typedef in the following code?
typedef char * string_t;
#define string_d char *;
string_t s1, s2;
string_d s3, s4;

A Yes

B No

Q6: 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;

A Yes

B No

Q7:
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.

A No

B Yes

Q8:
Which header file should be included to use functions like malloc() and calloc()?

A stdlib.h

B string.h

C dos.h

D memory.h

Q9:
What function should be used to free the memory allocated by calloc() ?

A malloc(variable_name, 0)

B dealloc();

C memalloc(variable_name, 0)

D free();

Q10: How will you free the memory allocated by the following program?
#include<stdio.h>
#include<stdlib.h>
#define MAXROW 3
#define MAXCOL 4

int main()
{
    int **p, i, j;
    p = (int **) malloc(MAXROW * sizeof(int*));
    return 0;
}

A memfree(int p);

B free(p);

C dealloc(p);

D malloc(p, 0);