C
Programming and Technical
Programming
Basics
[1] void pointer(void*)
[2] NULL pointer
[3] integer pointer(int *)
[4] Specific pointer according to the memory
allocated for specific type
Read Solution (Total 10)
-
- Answer first void pointer is correct malloc returns void pointer and we typecast it as our need and store it in a pointer variable ; void means empty so it gives pointer which type is defined by you
- 8 years agoHelpfull: Yes(1) No(0)
- void* and int* both
- 8 years agoHelpfull: Yes(0) No(0)
- void pointer(void*)
- 8 years agoHelpfull: Yes(0) No(0)
- void pointer(void *)-->option:1
- 8 years agoHelpfull: Yes(0) No(0)
- 4)
malloc() function allocates size bytes and returns a pointer to the allocated memory. The memory is not initialized. If size is 0, then malloc() returns either NULL, or a unique pointer value that can later be successfully passed to free(). - 8 years agoHelpfull: Yes(0) No(0)
- void pointer
- 8 years agoHelpfull: Yes(0) No(0)
- void*
return type of malloc is void *.. but i can b type cast to any other datatype - 8 years agoHelpfull: Yes(0) No(0)
- void pointer(void*)
- 8 years agoHelpfull: Yes(0) No(0)
- 1. as it is only return type
- 8 years agoHelpfull: Yes(0) No(2)
- void pointer ,, becoz it can point any type of data type not a specific 1
- 8 years agoHelpfull: Yes(0) No(0)
C Other Question
What is the output and why?
#include
int main(){
int i=(char)65;
printf("%d %c %f %d",i,i,i,i);
return 0;
}
Which one of the following option best denotes the pair of operators, which are used in finding the BINARY equivalent of an integer number?
[1] ==, >>, &&
[2] ==, >>, &
[3] =, >>, ||
[4] ==, <>, <