String str;
char *str;
float str = 3e2;
Both String str; & float str = 3e2;
char *str = “Best C programming classes by Sanfoundry”;
char str[] = “Best C programming classes by Sanfoundry”;
char str[20] = “Best C programming classes by Sanfoundry”;
char[] str = “Best C programming classes by Sanfoundry”;
(*ptr)++
++*(ptr)
(ptr)*++
(ptr)++*
Value of elements in array
First element of the array
Base address of the array
Address of the last element of array
remove(var-name);
free(var-name);
delete(var-name);
dalloc(var-name);
unalloc()
Dropmem()
Dealloc()
free()
‘.’
‘&’
‘*’
‘->’
int *int(a);
int *x, *y;
float *aptr;
int *x; float *y;
What will be the output of the following code?
6
Invalid syntax because / * is used for comments.
8
IInvalid syntax because three binary operators can’t be together in an expression.
cmp is a pointer to an void type.
cmp is a void type pointer variable.
cmp is a function that return a void pointer.
cmp function returns nothing.
What will be the output of the following code segment?
Structured Programming
tured Programming
ctured Programming
There will be no output as there is a syntax error in code
ptr++
*ptr
++ptr
++*ptr
A pointer to function that accept an integer argument and return an integer
A pointer to a, which returns an integer
A pointer to subroutine which returns an integer
None of the above
int *b[10], a[10];
int *b, a[10];
int b, *a[10];
int b, (*a)[10];
Consider a structure defined as follows:
sp.marks
sp -> rollNo
student.course
s -> name
int a[10];
int *p = (int *) malloc(10 * sizeof(int));
int *p = (int *) calloc(10, sizeof(int));
none of the above
calloc() takes a single argument while malloc() needs two arguments
malloc() takes a single argument while calloc() needs two arguments
malloc() initializes the allocated memory to ZERO
calloc() initializes the allocated memory to NULL
int &p;
int *p[10];
int **p;
int *p[ ];