Can you write another expression which does the same
job as ++*ptr;
Ans: (*ptr++)
Are the expressions *ptr++ and ++*ptr same?
Ans; No. ptr++ increments the pointer and not the value
pointed by it, whereas, ++*ptr increments the value being pointed to by
ptr.
What is a null pointer, a NULL macro, the ASCII NUL
character & null string?
- A null pointer is a pointer, which doesn’t point anything.
- A NULL macro is used to represent the NULL pointer in source code. It has a value 0 associated with it.
- The ASCII NUL character has all its bits as 0 but doesn’t have any relationship with NULL pointer.
- The NULL string is just another name for an empty string.
What will be the output of the following program?
#include<stdio.h>
void junk(int i,int*j)
{
i=i*i;
*j=*j**j;
}
void main()
{
int
i=-5,j=-2;
junk(i,&j);
printf("\ni=%d,
j=%d",i,j);
}
ans: i=-5,j=4
Representation of data
structure in memory is known as
- Recursive
- Abstract data type
- Storage structure
- File structure
Which of the following
search algorithm requires a sorted array?
- Linear search
- Hash search
- Binary search
- All of these
What will be the output of
5.0 / 2?
- 2
- 3
- 0
- 2.5
In which linked list last
node address is null?
- Doubly linked list
- Circular list
- Singly linked list
- None of the above
The Default Parameter
Passing Mechanism is called as
A.
Call by Value
- Call by Reference
- Call by Address
- Call by Name
In which tree, for every
node the height of its left subtree and right subtree differs almost by one?
- Binary search tree
B.
AVL tree
- Threaded Binary Tree
- Complete Binary Tree
The _______ memory allocation function modifies the previous
allocated space.
- calloc
- free
- malloc
- realloc
Which of the following data
structure is linear type?
- Strings
- Queue
- Lists
- All of the above
The statement print f
("%d", 10 ? 0 ? 5 : 1 : 12); will print?
- 10
- 0
- 12
- 1
Recursive functions are
executed in a?
- First In First Out Order
- Load Balancing
- Parallel Fashion
- Last In First Out Order
Which operators are known as
Ternary Operator?
- ::, ?
- ?, :
- ?, ;;
- None of the avobe
An array elements are always
stored in _________ memory locations.
A.
Sequential
- Random
- Sequential and Random
- None of the above
Which of
the following shows the correct hierarchy of arithmetic operations in C
- / + * -
- * - / +
- + - / *
- * / + -
No comments:
Post a Comment