-
-
-
strcat(buf,buf);
printf(buf);
}
While executing this in VC++ I do not get an output . Looks like the program runs into an infinite loop. But while executing the same in Turbo C I get the output as "hellohelloh". What could be the reason behind this difference in output?">Consider the following program segment :#include #include void main () { char buf[100] = "hello"; strcat(buf,buf); printf(buf);}While executing this in VC++ I do not get an output . Looks like the program runs into an infinite loop. But while executing the same in Turbo C I get the output as "hellohelloh". What could be the reason behind this difference in output?
-
-
-
-
How many times fork() function is executed
Main(){ if(fork()||fork()) return fork(); else return 0;}how many times fork() function is executed?
-
Pointer to an Array
What is pointer to an array? Explain with example.
How do you redirect a standard stream?
Most operating systems, including DOS, provide a means to redirect program input and output to and from different devices. This means that rather than your program output (stdout) going to the screen; it can be redirected to a file or printer port. Similarly, your program’s input (stdin) can come from a file rather than the keyboard. In DOS, this task is accomplished using the redirection characters,...
What is the output of the following sample C Code
Int *ptr = (int *)malloc(100*(sizeof(int)));ptr++;free(ptr);
Ans