15,552 Topics
| |
List at least two possible ways for linking against the math library. | |
I am working in Linux 2.14 kernel, and I have an assignment. I want to save for every process , the files it opens and closes , and the time he did that. for example : for process aaa : opening "file1" opening "file2" closing "file1" opening "file3" closing "file3" … | |
I am trying to code a math tutor program that will have random numbers generated. Any suggestions would be greatful. Output suppose to be: I am having problems with this code. I keep switching it around and can not seem to get it right. This is what output suppose to … | |
plz plz urgent im a beginner in unix. can someone reply asap . what are kernel modules?what role do they plan in building and runnig a kernel?what happens if the linux kernel did not support modules? | |
Hello guys! I'm new to C language and I need help to write a program which searches specific word in text file using Binary Search and count the number of comparisons!!! My text file consist of following data: apple book clock dog elephant fat hello key lucky moon olive paper … | |
Hey *.*, is it possible to get the current "Program Counter" of another running program? If it is, how can it be done? Thanks for any hint! svkers | |
I am writing a guessing game, player could only enter number ten times, after that, a "End" message should print. the random name =ran1 your enter number = a count the enter times = b I wrote : if ( ran1 != a) { b++; } printf("the count number: %d", … | |
how to write a c programme to print the numbers in following way 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1 0 1 0 1 0 1 please help me | |
Hello. I've been trying to solve this problem but I can't and my head hurts already. Please help me. [code=c] #include<stdio.h> #include<conio.h> #include<stdlib.h> #include<string.h> #define max 12 #define num 30 #define nam 24 typedef struct { char name[nam]; int score; int rank; }CONTESTANT; typedef struct { CONTESTANT CA; int next; … | |
How can I return the file modification time as an int (UNIX epoch)? [CODE]#include <time.h> #include <sys/stat.h> int *FILEMOD(char *FILENAME) { struct stat ATTRIBUTES; time_t MTIME; stat(FILENAME, &ATTRIBUTES); MTIME = ATTRIBUTES.st_mtime; return MTIME; } int main(void) { printf("%i",FILEMOD("file.txt")); return 0; }[/CODE] gcc errors: [ICODE]filemod.c: In function ‘FILEMOD’: mod.c:14: warning: return … | |
I want to finaly learn what's up with pointers and arrays, so i made up this program: [CODE]#include <stdio.h> int main() { int cantidad_frases = 0; printf("Cuantas frases quieres escribir?: "); scanf("%d", &cantidad_frases); char *frases[cantidad_frases]; for(unsigned i = 0; i < cantidad_frases; i++) { [B]for(; *frases[i]; frases[i]++)[/B] { *frases[i] = … | |
i need some help on this. I have the array numbers stored already but the array dosent display on the screen. Why? here is the code [CODE] # include <stdio.h> # include "simpio.h" # include "genlib.h" # include "strlib.h" # include <math.h> # define size 3 main() { int intArray[size][size]; … | |
Yeah i made a totally new program. However it still doesnt work. The error message says that it is an invaled conversion from int to int*. Here is the code. Please fix it and help repost it. [CODE]# include <stdio.h> # include "simpio.h" # include "genlib.h" # define SIZE 500 … | |
Hello, Could anyone please explain a reason why data could not be received from a POSIX message queue using mq_receive(), called from a different file. Following is my code for a test that i'm running to try and transfer data from one file to another. main.c [code=c] #include "recfun.h" int … | |
i want to know the program how to insert at the beginning of a circular linked list in C. | |
hi guys.. i need help in creating a 'c' program. i ve written the quest below.. pls take time to see the quest n answer it..thanks in advance you must provide a sentence as the arguments. The first word of this sentence is to be treated as a key word, … | |
| |
hi im trying to write a C program that produces an array like this 1,2,4,8,16... Basically i produce an array with with the power of 2 starting at 0 and going up to n. Here is my current code: However the array dosent show. What is the problem? # include … | |
After compiling the code found [URL="http://beej.us/guide/bgnet/output/html/multipage/clientserver.html#simpleclient"]here[/URL], I immediately got a number of errors. (Unfortunately, Beej is the starting point my instructor suggested to implement our FTP client's "minimal" commands, but that's another story). Anyway, I got rid of a few of them, then ran into this: [CODE]client.c:32 - error: storage … | |
I am trying to write a program that will input a bunch of names into an array of structures under the .name heading. Currently I have what is below to get it to work. But it's not very flexible. You have to input [U]both[/U] a first and a last name … | |
Hello friends. I am experiencing problems using the getline function in C. I want to use the function to print line numbers next to the text of each line of an input file. I have successfully read in the file and printed its contents line by line. But when I … | |
Just another way to check if a word is palindromic or not. In my country (Greece) if a word is palindromic we say it is "καρκινική" that's why i named the fuction in the code kark(). -What it does? If we would say that word has n letters,then this compares … | |
I'm focusing now on this I/O thing, even writing a guide by looking some sources. I want to cover it all i can about stdin i/o and if it looks good in the end i'd love to share with you. But that's still OT. I can't get rid of the … | |
Hey I have a file named filetext.txt with the text: One word Two words Three words Four words and the program should read this filetext.txt and output to another file called filecopied.txt this text: One Two Three Four I have this so far: [code] #include <assert.h> #include <complex.h> #include <ctype.h> … | |
Hi there, So im working on this assignment where the user is supposed to input a variety of UNIX commands and they must behave as if one typed it into the terminal. My current problem lies with when a user tries to redirect the inputted commands to some file. Currently … | |
I am trying to write a little program with a do while loop and if statements. I'm having trouble getting this to work the way I want. When I run the program, it produces two menus after making a selection. I would like it to produce one menu after making … | |
Suppose that I have a program named myprog, and I type this in a shell [code] $ myprog -z hello -m "this is a message" [/code] The function main in myprog will receive a char** argv containing the following strings [code] "-z", "hello", "-m", "this is a message" [/code] So … | |
It is useful if you use gedit to code gtk. [url]http://code.google.com/p/jcodecompletion[/url] | |
I am very poor in calculating complexities. Please some one let me know what is the complexity of the below program. I actually want to write a program for finding the nth last element with 0(n) complexity. but unable write, please give me some idea. the below code works perfectly … | |
N00B. If I compile a simple Hello World! program on a 64bit linux, will it work on a 32bit linux? (I'm using gcc). [CODE]#include <stdio.h> int main(void) { printf("Hello World!"); return 0; }[/CODE] |
The End.