15,550 Topics

Member Avatar for
Member Avatar for ItecKid

*EDIT-I know strtok doesn't actually 'return' a segfault-I realize after submitting topic that is poor wording. Hello, I am having a problem with the C function strtok, as follows: [code=c] void function_name (char * cmd) /* Gathered from another function using readline. Assume 'ls -l' in this example */ { …

Member Avatar for abhimanipal
0
801
Member Avatar for Aditya Hegde

hello........ I m studying MCA 1st year.... I want to do pure C mini projects...... I need a list of Projects on C platform........ So anybody help me please............

Member Avatar for justiceigwe
0
61
Member Avatar for onus

I wrote a small hello world type of character device driver. When I type echo -n "abcdef" > /dev/bond and do a cat /dev/bond then only last "f" of above input abcdef is displayed rest nothing is displayed. I have experimented many things but I am unable to catch the …

Member Avatar for N1GHTS
0
198
Member Avatar for mmmm1118

i make a program using C title HOTEL MANAGEMENT in which i want to print out of bill for customer then what is code for that plz... help me

Member Avatar for N1GHTS
-2
94
Member Avatar for mmmm1118

How can i make a data base using C give an example and also give list of software required

Member Avatar for N1GHTS
0
186
Member Avatar for mmiikkee12

Any idea how to implement a FIFO queue of chars in C? It doesn't need to be too fancy, just a fixed size (say 256 chars) and can't use any library functions (this is for a hobby OS kernel I'm writing, and there's not a lot of functions available for …

Member Avatar for kiranxxx
0
2K
Member Avatar for reddishmiles

hi pls gelp me with my assignment.. i supposed to create a cash register program that will calculate customer's payment and change.. here's what i have so far.. [CODE]#include<stdio.h> #include<conio.h> int main(void) { printf("Welcome to Reddish Bar&Cafe"); printf("\n\n\Choose from the items below:"); printf("\n\n\n\Margarita= 25 bucks"); printf("\n\Beer= 10 bucks"); printf("\n\Martini= 35 …

Member Avatar for reddishmiles
0
953
Member Avatar for phummon

Hi everyone, I'm a moderately experienced C coder trying to figure out the [B]execve()[/B] command. Here's the basic problem: My program takes a command from the user, loaded into the string UsrCmd. The string is tokenized and each token is loaded into ParaArray[]. Then ParaArray[] is used as arguments to …

Member Avatar for mitrmkar
0
279
Member Avatar for binary_boy

this is an assignmentin which i have to create a programme which takes in two input arrays which are already sorted and outputs a combined sorted array. this has to be done by multi threading. we have to create a new thread to take the input of the arrays and …

0
52
Member Avatar for varun mca

[B]Hello sir... I want to know that if we can make a function that exactly works as clrscr() if yes then please give me some idea to implement that..I will try that...[/B]

Member Avatar for Adak
0
115
Member Avatar for jrhitokiri

Hello, I have this code that supposedly imitate a DTR for a homework. I've made the preliminary code, but I'm kinda surprised at the output since it's not what I had expected. Here's the code: [CODE] int login() { int id; char* name, log_time; time_t lt; lt = time(NULL); printf("\nPlease …

Member Avatar for jrhitokiri
0
236
Member Avatar for DanHu

I am trying to divide a integer (2's complement) by a power of 2 and then round that number toward zero. I am only allowed to use bitwise operators such as shifts, ~ ^ & | etc. I've came up with 2 expression but they dont seem to work. Can …

Member Avatar for nbaztec
0
202
Member Avatar for harshchandra

This code calculates and the average waiting time of the process given acc to their burst time..It is a famous scheduling algorithm for process scheduling in operating sysytem . After calculating waiting time it also generates the gantt chart for the process given .

Member Avatar for ezkonekgal
-2
1K
Member Avatar for algarmon

I migrated a c application using the cc compiler from AIX version 5 to Solaris 10. First, I compiled my application with cc compiler using Solaris 10. I did not use special compilation options and compiled without error. Then, I run the application and found the first buffer overflow, then …

Member Avatar for N1GHTS
0
201
Member Avatar for gaurav_13191

Hi, I have the code to add elements at the end of the linked list using recursion. [CODE] //Adds an element at end using recursion #include<stdio.h> #include<conio.h> #include<stdlib.h> struct node { int data; struct node *link; }; void addatend(struct node **,int); void display(struct node *); int main() { struct node …

Member Avatar for N1GHTS
0
558
Member Avatar for myk45

Hello. i wanted to generate the following series(pattern). [B]The captain of TITANIC is a mathematics freak. He has recently been given a problem that he is unable to solve. And he has asked your help to solve it. There are n numbers in a given expression. X1 X2 X3 .... …

0
65
Member Avatar for Dazaa

Hi, I usually use C++, but I am working with some very old code and need to do it in C. So i understand malloc is used char *p; p = malloc(200); where 200 is the amount of bytes I need. and yes i know I need to use free. …

Member Avatar for sree_ec
0
173
Member Avatar for harikrishna439
Member Avatar for Ancient Dragon
0
84
Member Avatar for senche

Hi, Can anyone provide some examples or materials explaining ANSI and Non ANSI C Standards? Need some examples for non Ansi C Stanadard. Thanks in advance, regards, senche

Member Avatar for N1GHTS
0
964
Member Avatar for Dewey1040

I'm trying to create a program to add two IEEE 754 floating point numbers, I'm pretty far into the program but I've come to a halt in the bit shift section of the algorithm. I have created a tmp variable to copy the mantissa(0's and 1's inside the char array …

Member Avatar for N1GHTS
0
1K
Member Avatar for mmmm1118
Member Avatar for SamSmiles

I have a programming assignment which I must complete and I need help starting it. We can't talk about code with the professor or the TA so I thought I'd come here to try and ask. Pretty much were going to be given a text file. This text file will …

Member Avatar for Ancient Dragon
0
108
Member Avatar for galmca

i 'm trying to make this program of a prime number in c language but ive not been able to do so,can any 1 of u plz help me out...i want to do 2 things... 1)First,test whether a number is prime or not 2)generate the series of all the prime …

Member Avatar for ramesh thota
0
468
Member Avatar for bflack

Just one question: Is the two dimensional array coordinates in C opposite to what the coordinates used in plotting in the CARTESIAN PLANE??? please answer and thanks

Member Avatar for N1GHTS
-1
4K
Member Avatar for onus

I am writing a program to reverse a string without using string functions available from standard library. Following code is giving me some error when compiling [code=c] #include<stdio.h> int main () { int i,j; char *p,*s,*g; p="abcdefgt"; i=0;j=0; s=NULL; g=NULL; while (p[i] != '\0') { printf(" %d %c\n",i,p[i]); i++; } …

Member Avatar for N1GHTS
0
516
Member Avatar for blackrobe

Hey there, I'm having some difficulty understanding how pthreads are used for writing to files and reading from files using a buffer cache. There are two data structures available: 1- The first data structure is just an array of files each index contain information about the size of the file …

0
61
Member Avatar for viji.cs

Hai everyone, I have one doubt... Can u please clarify this... If i put char a[10]="hai-hello" [I][CODE]if(strcmp(a[4],'-')==0)[/CODE][/I] then it will displays an error [B][I]strcmp' : cannot convert parameter 1 from 'char' to 'const char *'[/I][/B] Wat is the reason for this? Can anybody tell me

Member Avatar for viji.cs
0
74
Member Avatar for nidhik
Member Avatar for Dazaa
0
64
Member Avatar for karthiken07

Can any one give me an idea for compare these two values in double data type. I hope this if check always gets FALSE, Unfortunately It is TRUE condition. IF you know any solution,Plz suggest to me. # include <stdio.h> int main() { double g = 51.200000000000007; double h = …

Member Avatar for N1GHTS
0
164
Member Avatar for tusharforever

Hi Folks, In my case i am passing the void pointer which will be assigned with some memory to the firmware; in return firmware will fill this void pointer and returns. My requirement is i have parse this filled data. But data filled by the firmware is complex. e.g it …

Member Avatar for tusharforever
0
250

The End.