Trying to print *ip as a character when I apply post increment operator gives me 'D' and for pre-increment it gives me a bus error. Why? 
 
-------program code starts
 
#include<stdio.h>
int main()
{
char *c_array;
int *ip;
 
 c_array = (char *)malloc(100);
strcpy(c_array,"ABCDEFHIFGHIJKLMN");
 
 ip = (int *)(++c_array);
 return 0;
}
 
-------program code exit 

a       n       u       b       h       a       v              h      a     n      j      u      r      a
______________________________________________________
E-Mail:        [EMAIL PROTECTED]
Telephone:  ( 091 )-0124-342971-302 [O]
 

Reply via email to