that is because of the way the input is fed into the program.
WHen you ask for choice, you (ie scanf) waits for new line to be pressed before seeing the input. Since you are reading a 'char' only, this newline is in the input buffer and that is what your next getchar (or even scanf) will see...
type this in command mode in vi
:%s/^V^M//g
Basically your are removing the ctrl-M character from the file. You will have to type ctrl-V before typing ctrl-M.
Mohan
Depends on the scope you are looking at. You could try to build a memory manager if you are looking at something decent but not that complex. Will give you good exposure to pointers, linked lists etc ...
Mohan
Hi Kumar,
The core file contains all the process information pertinent
to debugging: contents of hardware registers,process status, and process data.
You can do a "man core" and see all the gory details.
You can use the core file to debug and see where and how the program failed...
Hi,
I need to know the equivalent of pmap command of Solaris in Tru64.
pmap of solaric gives the foll output
$ pmap pid
23349: bash
00010000 432K read/exec /usr/bin/bash
0008A000 80K read/write/exec /usr/bin/bash
0009E000 168K read/write/exec [ heap ]
FF100000...
It all depends on how you do it. Since every c program is a c++ program, does that mean you are just using different compilers ? In that case i dont think there will be any difference(atleast with gnu compilers).
But to comment on generality, C is faster.
Mohan
ensure that the path of the scripts is in your PATH env.
For your case do the following
setenv PATH .:$PATH
After this, the scripts will execute just by the name. If you are very sure, you could add this to your .cshrc file
Mohan
The best way i think is this
#!/bin/bash
num_sii=`ls /home/sii/incoming/ | wc -l | tr -d ' '`;
if [$num_sii -eq 0]
then
echo "There aren't any new files.\n"
else
echo "There are $num_sii new responses."
...
fi
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.