first of all you've declared the character array incorrectly..
char *temp[len];
should be
char temp[len];
Type: Posts; User: xabhi
first of all you've declared the character array incorrectly..
char *temp[len];
should be
char temp[len];
yes, the parent process starts the child, but just after the call to fork() the child executes first. the reason is to enable safe copy-on-write.
when you use fork, the child process is always started first...
after the fork() call the child process becomes an independent process and thus, is scheduled interdependently with other...
i think the logic of your program isn't quite correct... for eg..
if(( a + b > c) || ( b + c > a) || ( a + c > b))
should be..
if(( a + b > c) && ( b + c > a) && ( a + c > b))
seriously.. what is wrong with me.. i'm not that stupid you know...
no it's not...
the most efficient way is this..
if (number > 9)
number = number % 9;
return number;
here the number is what the use inputs... for eg. if number = 12345, then 12345%9 = 6
use system command. or a better way would be to use the exec family.
realloc may readjust the data in the memory as it resizes the segment. so if you realloc a string chances are the returned pointer may not contain a valid string..
clearly missed these points... thanks
m = ++i && ++j || ++k;
the logical operators && and || are short-circuit operators with left to right associativity. so in above expression, evaluation starts from the left most variable, i.e. i,...
here's a code i wrote to find out how non-blocking read works...
#include<stdio.h>
#include<stdlib.h>
#include<fcntl.h>
#include<errno.h>
why wont anybody answer??? why???
you haven't initialized sum_int here...
int sum_digits(int number)
{
int remainder, sum_int;
while(number!=0 && remainder!=0)
{
sum_int= sum_int+ number- number/10*10;
thanks.. i know about non canonical input. the thing is that if this read was reading from an open file it would have returned after reading data from it, without the need of any key press. it's the...
here's a code i wrote to find out how non-blocking read works...
#include<stdio.h>
#include<stdlib.h>
#include<fcntl.h>
#include<errno.h>
int main()
you can write an application agent module, similar to those used by antiviruses, media player etc. like winamp uses it's agent to maintain file association and prohibits other apps from changing it. ...
thanks a lot for your time.
how to do this with curses? the functions that support non-blocking input are also available for everything else. and i don't recall any other function specific to...
hi, i wanted to emulate a terminal that asked for a user input, like login name, but doesn't wait for it indefinitely. a timer runs in the background and if no hit is received from the keyboard...
no, this is not my homework and i did not ask for a complete solution. read my post again. i only asked if anybody can provide me with a link or something to the answer if it's OTI. also, it's one of...
hi.. can anybody point me to the solution to a particular exercise question? it's the last question of the exercise of the 5th chapter, Pointers and Arrays, which is about generalizing the dcl...
thanks...
hi, i wrote the following program to print out the contents of the memory of a variable. to handle different types, i have used macros definition combined with a void pointer...
...