C programming doubt!!!
Posted
by aks
on Stack Overflow
See other posts from Stack Overflow
or by aks
Published on 2010-05-07T10:22:12Z
Indexed on
2010/05/07
10:28 UTC
Read the original article
Hit count: 287
c
Hi,
I am having a programming doubt? Please have a look at the below mentioned code snippet and tell me the difference?
int main()
{
struct sockaddr_in serv_addr, cli_addr;
/* Initialize socket structure */
bzero((char *) &serv_addr, sizeof(serv_addr));
}
Now, what if i do something similar without typecasting (char *)
, then also i feel it will do the same thing? Can someone clarify?
/* Initialize socket structure */
bzero( &serv_addr, sizeof(serv_addr));
© Stack Overflow or respective owner