/*A MISHAPPENING WITH CODE BY OVERRITING SAME CODE WHICH IS RUNNING NOW*/
#include<stdio.h>
#include<fcntl.h>
#include<stdlib.h>
#include<string.h>
#include<unistd.h>
int main()
{
char buff;
int sor,wfd,bfd,count=1,i=0;
bfd=open("desti",O_RDONLY);
printf("bfd=%d\n",bfd);
wfd=open("check",O_WRONLY|O_CREAT);//1st i had opened the file with same name that is executing at now time ...overiting of data takes place ..results mishappening with program..so infinite loop ..takes place ..with no condition...