15,551 Topics

Member Avatar for
Member Avatar for ham130489

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" …

Member Avatar for gerard4143
0
183
Member Avatar for katbury

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 …

Member Avatar for melepuram
0
103
Member Avatar for rudz

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?

Member Avatar for rudz
0
136
Member Avatar for timaquerra

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 …

Member Avatar for timaquerra
0
120
Member Avatar for svkers

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

Member Avatar for gerard4143
0
144
Member Avatar for Wtyy

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", …

Member Avatar for Dave Sinkula
0
167
Member Avatar for nandini vishuu

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

Member Avatar for karthik viswam
0
188
Member Avatar for Whilliam

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; …

Member Avatar for Whilliam
0
398
Member Avatar for raigs

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 …

Member Avatar for SVR
0
78
Member Avatar for neithan

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] = …

Member Avatar for neithan
0
157
Member Avatar for wangatang126

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]; …

Member Avatar for wangatang126
0
90
Member Avatar for wangatang126

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 …

Member Avatar for wangatang126
0
136
Member Avatar for katwalatapan

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 …

0
125
Member Avatar for suchita

i want to know the program how to insert at the beginning of a circular linked list in C.

Member Avatar for subhashkataria2
0
108
Member Avatar for crashovercool

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, …

Member Avatar for ithelp
0
105
Member Avatar for richy.2078
0
51
Member Avatar for wangatang126

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 …

Member Avatar for neithan
0
156
Member Avatar for BestJewSinceJC

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 …

Member Avatar for BestJewSinceJC
0
181
Member Avatar for RobertMW

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 …

Member Avatar for Aia
0
118
Member Avatar for Grn Xtrm

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 …

Member Avatar for Grn Xtrm
0
113
Member Avatar for panagos

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 …

0
236
Member Avatar for neithan

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 …

Member Avatar for neithan
0
136
Member Avatar for riahc3

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> …

Member Avatar for Tom Gunn
0
924
Member Avatar for opt!kal

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 …

Member Avatar for opt!kal
0
101
Member Avatar for cloisterham

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 …

Member Avatar for Tom Gunn
0
540
Member Avatar for Gribouillis

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 …

Member Avatar for Gribouillis
0
216
Member Avatar for jqbsx

It is useful if you use gedit to code gtk. [url]http://code.google.com/p/jcodecompletion[/url]

0
71
Member Avatar for Iam3R

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 …

0
295
Member Avatar for raigs

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]

Member Avatar for ankur_
0
169
Member Avatar for raigs

How to: 1. Buffer output ? 2. Get its size ? 3. Print the buffer ? [CODE]#include <stdio.h> int main(void) { printf("Tons of printf lines\n"); // 1. Somehow buffer the output up until this point printf("The size of the buffer is: %i\n", SIZEOFBUFFER); // 2. Get and print the size …

Member Avatar for raigs
0
4K

The End.