Posts
 
Reputation
Joined
Last Seen
Strength to Increase Rep
+3
Strength to Decrease Rep
-0
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
2
Posts with Downvotes
2
Downvoting Members
2
1 Commented Post
0 Endorsements
~2K People Reached
Favorite Tags
Member Avatar for rwagnes

I am supposed to create a chain of N processes, where N is the command line parameter. Each process creates a child process, prints out its own PID and its parent's PID, and then waits for its child to terminate by calling the wait() function. [B]Here is my code:[/B] [code=c] …

Member Avatar for shakunni
0
231
Member Avatar for shakunni

I know how to use the file_pointer=fopen("location","type") to open and check if a file exists. But I'm not sure how I would use this command or a similar one to check if a folder exists? What command do I have to use to check if a folder exists in the …

Member Avatar for Ancient Dragon
0
91
Member Avatar for shakunni

We've made a form and when the user fills out the form and clicks "send" we want to do the following: 1) Get the data 2) Run a python script which displays the factorial of 10 [code] <!test get form> <html> <head> <center> TEST </center> </head> <body> <form name="input" action="./fact.py" …

Member Avatar for webmaven
0
70
Member Avatar for shakunni

Hey, I needed to delete a file created by a child process and our prof suggested that I use the system() command to do so. I 'manned' system but cant find anything useful on how to use it to delete an opened file. Can anyone suggest as to how this …

Member Avatar for marco93
0
90
Member Avatar for shakunni

As part of my program, I have defined and initialized a structure. But when I compile it, gcc gives me the following error on all the initialization " initializer element is not constant". Anyone know why this is the case? [code] struct RECORD { char* username; char* password; char* type; …

Member Avatar for shakunni
0
124
Member Avatar for shakunni

I need to edit every character of a string for an assignment; apply a simple Caesar cipher on it. What is the C equivalent of "charAt()"? I remember my prof saying that all strings are terminated with a certain character in C and that you could run a while loop …

Member Avatar for shakunni
0
76
Member Avatar for shakunni

How do you add a character to an existing string? In java you could just do: char c='a'; String b="posit"; b+=c; but I tried doing that in C and it doesnt work. Is there a workaround? Thanks.

Member Avatar for shakunni
0
86
Member Avatar for shakunni

I need to read data from a flat file [find below] into a linked list. Each line is a record and each record needs to be read into a different node. After I open the file using fopen(), I have the following problem: 1) How do I move from the …

Member Avatar for gerard4143
0
101
Member Avatar for dmm

can I open a file and then close it in a loop? I tried but it doesnt seem to work. :(

Member Avatar for shakunni
1
90
Member Avatar for shakunni

Hey, How do I create a file from a C program? I want to check if the file exists and if it doesnt, then create it. I am using the following code to check if it exists: [code] filecheck() { b=fopen("password.csv","r+w"); if(b==NULL) { // need code for creating a file …

Member Avatar for venomxxl
0
116
Member Avatar for shakunni

Hey, How do you read from the command line in C? I need to read 10 arguments from the command line. Can I use char* argv[] as a parameter in the main function to do so? Thanks.

Member Avatar for thines01
0
154
Member Avatar for shakunni

Searching a linked list linearly is very inefficient. Is it possible to use binary search on linked lists?

Member Avatar for shakunni
0
103
Member Avatar for shakunni
Member Avatar for Rashakil Fol
0
80
Member Avatar for shakunni

Hey, How do you prove that log (n!) is big theta of n log n? I tried using the definition method and the shortcut rules but I keep getting stuck.

Member Avatar for SebKom
0
96
Member Avatar for shakunni

Hey, so I need to write an algorithm that will do the following and run in O(n): Search linearly through an array of size n and for each element check whether array[i]>array[i-k] for all k=1,2,...n/5. Its easy to do this with two loops but I cant figure out how to …

Member Avatar for eggmatters
0
105
Member Avatar for shakunni
Member Avatar for BestJewSinceJC
0
84
Member Avatar for shakunni

So I have to read data from a text file into a [50][50] array and Im not really sure which commands I can use to do that and to write back some data into another file. Would really appreciate some help on this.

Member Avatar for VernonDozier
0
164
Member Avatar for shakunni

I was wondering if there was a way to control the cursor on Linux and use a C/C++ program to make a certain 'output' appear on the screen in any co-ordinate we want for a specific period of time?

Member Avatar for Ancient Dragon
0
51