C Programming - Pointers - Discussion

Discussion Forum : Pointers - General Questions (Q.No. 2)
2.
Can you combine the following two statements into one?
char *p;
p = (char*) malloc(100);
char p = *malloc(100);
char *p = (char) malloc(100);
char *p = (char*)malloc(100);
char *p = (char *)(malloc*)(100);
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
82 comments Page 8 of 9.

Madhureddy said:   1 decade ago
Kavyashree explanation was excellent.

Divya said:   1 decade ago
Thanx kavyasree & mahesh........

Jadhi said:   1 decade ago
I want to know about malloc clearly.

Katty said:   1 decade ago
The space is allotted for pointers.

Vinoth said:   1 decade ago
Good example given by arunpandian

Appala prathyusha said:   1 decade ago
How do we know the address of i?

Ganathantrapureddy said:   9 years ago
Thanks for all given solutions.

Rajendra said:   1 decade ago
Thanks mahesh and kavaya.

Shehryar said:   8 years ago
Explain it in detail.

Fousiya said:   1 decade ago
Thanks Kavyasri


Post your comments here:

Your comments will be displayed after verification.