How do i find a file on the same day and that has been modified between a particular time period.
For example.
I wish to find a file today i.e. 19 th Jan between 0900 and 1700 hours.
There are quite a few probs in ur prog
1. scanf - U hav declared a 2 dim array so scanf shud be
scanf("%d",&salary[0][0]);
scanf("%d",&salary[0][1]);
scanf("%d",&salary[0][2]); ......
scanf("%d",&salary[1][11]);
2. Also the while (!match) loop is never...
I am looking out for a linker to link my object files. These files are compiled using Microsoft C 6.0 compiler under SCO UNIX environment . I have a linker called xlink which is a dos linker. Currently I am facing some probs linking my object files. The error is MEMORY BUFFER FULL. Can anyone...
i think guestgulkan is right about the temp being declared as float. Also the loop will have to be modified a bit(logically). At present if the first value entered is a -ve one then the loop will not be exited.
int strcnt(char *str, int x) {
int y = 0;
while (*str++) {
if (*str == (x+48)) {
y++;
}
}
return y;
}
void main()
{
char abc[] = "12343212343212";
int n = 2;
printf("%d\n", strcnt(abc, n));
}
Here *str gives the ASCII value...
I think that this is a very trivial discussion going on abt passing variables. I'm sure that passing by address (or reference) can be checked out in any C book.
Passing by reference means passing a pointer. The reference or the address of a variable is passed to a function.
void f1(int a)
{
a=5+a;
}
void f2(int *a)
{
*a=5+(*a);
}
void main()
{
int m=5;
f1(m);//pass by value
printf("%d",m);//will print 5
f2(&m);//pass by reference...
alternative
in 'd_script.sh'
for i in `find . -name $1`
do
echo $i
#ur work
done
pass what u want to find as a command line argument
e.g.
d_script.sh *.bak
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.