hi all
i just have a quick question.
i am writing a script that will check the number of links for each file in the user's directory and output the appropriate message.
here it is:
#!/bin/sh
ls -l >outputfile
HERE IS MYQUESTION: how do I loop through each line of the file outputfile
for...
Hi all,
Which version of bianry search is better? the forgetful version or the one that terminates as soon as the value is found.
Also , can anyone explain to me how comb sort works?
Thanks,
Hi all,
How do you clear a queue that is implemented in an array?
here is my tentative code below. Please give me some feedback. Thanks
void clearqueue (queueentry *x, queue *q)
{
while(q->front)
{
q->count--;
x*=q->entry[q->front];
q->front=(q->front + 1) % MAXQUEUE...
HOw can I make a square using just single dimensional array?
for example array[12]={1,2,2,3,4,5,6,4,5,6,9,12} would give something like: 1 2 2 3
4 5 6 4
5 6 9 12
I knom I need to use a for loop but can't get it to print it out correctly.
THanks a lot
Hi
I need to use the script below to make a script that concatenate 2 lists together so the input to the script will be colon or space separated lists and the output will be a single colon separated list with all redundant items removed.
I would appreciate any help and pointers to get me...
Hello,
How can I call a function that rturns a node?
Its declaration is ELE find().
I have
typedef struct Ele ELE;
typedef struct *Ele *ELE;
struct Ele{
char *adress;
char *name;
int id;
ELE *next.
};
Thanks you,
Hi all, I wrote this script (prog3a) that replaces all of the occurences of a search-string with the replace-string in the file specified on the command line. the sed command should send the output to a temp file , then the temp file is moved to $file.keep. when i run the script I get the...
Hi all,
I need to write a script that concatenate lists together, and output the resulting list. For example:
clean_list a a:b a:b:c :x: y:z
a:b:c:.:x:y:z
How do I go about that, could someone please help get me started;
Thanks
Hi all,
Can someone please tell me what is wrong with the code below.i get a " "curr->name" is not an lvalue,but occurs in a context that requires one.curr->name=list1[i];" message when i compile it.
Why is that?
Thank you.
#include<string.h>
#include <stdio.h>
#define...
Hi everyone,
I need to build a linked list by merging two sorted character arrays together.
How do I go about that and where can I find some good information on working with linked lists?
Thanks.
Hi all
Whenever I try to compile this code, I get
cc: Error: readtopps.c, line 3: In this declaration, "data" has no linkage and is of an incomplete type. (incompnolink)
int data[];
What does the error message means?
Thanks,
#include <stdio.h>
int* readtopps (char fn[]){
int...
Hi all,
I need to write a function for a program that I am working on. This function takes an int array and a pointer to an array of structures, compares the elements, and writes the matches to another array.
I know that the function would look something like:
Consider that the variables have...
Hi everyone,
I get a funny message whe I compile the program below.
ld:
Object file format error in: time.h: read_cur_obj_info: bad file magic number(0x7473)
Here is the code, Please point me to any errors that I am making.
Thanks
#include<stdio.h>
#include"time.h"
struct TIME {...
Hello all,
I wrote this program that replace a string with another, using my own varaition on string function and now can not get it to work.Please take a look and tell me what I am doing wrong.
I have pasted below the code for all the functions I am using. Thanks in advance.
#include<stdio.h>...
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.