15,550 Topics

Member Avatar for
Member Avatar for nadleeh

if i have a list kinda like this "name" bobby "endname" "age" 34 "endage" "name" susie "endname" "age" 53 "endage" how would i sort through it ignoring the stuff in "" and copying just the names and ages into arrays. ive been using strtok and if statements but that doesnt …

Member Avatar for Adak
0
135
Member Avatar for thecstudent

Hello World! I am new to C and would like to write a C program to accomplish the following: I have an external 600GB USB disk device, Padlock Pro. The device, which can be seeing at: [url]http://www.amazon.com/Apricorn-Encrypted-Portable-External-A25-PLe256-640/dp/B003EYVJTU/ref=sr_1_1?ie=UTF8&qid=1298479333&sr=8-1[/url] has a number pad on it. It uses a maximum key of 16-digit, …

Member Avatar for thecstudent
0
199
Member Avatar for chound

Is it possible to create programmes to run on coumputers thad do not have any operating systems? :evil: :cheesy: :sad:

Member Avatar for aer9998
2
218
Member Avatar for Protoroll

So I converting a decimal value into hex, but I need to print it out from an array. I'm not sure where to go from here. [CODE] #include <stdio.h> #include <stdlib.h> #include <string.h> int hexa = 16, deci, quotient, p; void dec2hex(unsigned int x, char hex[]) { for (p = …

Member Avatar for Ancient Dragon
0
120
Member Avatar for sonuja

how to connected data base(sql) with c language......? with exampal...?

Member Avatar for Ancient Dragon
0
128
Member Avatar for salvador01

hi! good day im a newbie and trying to learn functions in C. and im having a problem with functions. int charges (int l, int w) { int c_charg; c_charg = 8.23 * area; } l = 6, w= 3, and area = 18 problem is 'c_charg' is assigned a …

Member Avatar for jonsca
0
87
Member Avatar for vineeshvs

i allocate memory for b_edge in function bark_edge and give value to only b_edge[1][1] and try to return b_edge from function. segmentation fault comes? can you please check why? [CODE]//function bark_edge+main program #include<stdio.h> #include<math.h> #include<stdlib.h> double **bark_edge(); main() { double **b_edge; b_edge=bark_edge(); printf("%f",b_edge[1][1]); } //FUNCTION-bark_edge double **bark_edge() { int i=0; …

Member Avatar for vineeshvs
0
178
Member Avatar for vineeshvs

segmentation fault comes in the program? please help? is there any way i can check in which part of the program is the mistake? Thanks daniweb and members... [ICODE] //function bark_edge+main program #include<stdio.h> #include<math.h> #include<stdlib.h> double **bark_edge(int f_size,int samp_freq); double **transpose(double **x,int M,int N); main() { int f_size=1024; float samp_freq=44100,fcmax=samp_freq/2; …

Member Avatar for vineeshvs
0
346
Member Avatar for Nurkan

[B]Hello To All Programmer:),,,im a beginner plzz help to make this program.. Make a program of am institution using manual system flow and convert it to computerized system using Turbo C program..:S the institution is Boutuque.. plzz help me...TY programmer,,[/B]

Member Avatar for Adak
-1
102
Member Avatar for axn

How do I read and print just n(10) lines in a file and not whole file. [CODE]#include<stdio.h> #include<string.h> int main() { char line[50]; FILE *datafile; datafile = fopen("/data3", "r"); while(fgets(line,sizeof line,datafile)!=NULL) printf(" %s\n", line); fclose(datafile); return 0; }[/CODE]

Member Avatar for Narue
0
161
Member Avatar for sonuja
Member Avatar for Adak
0
79
Member Avatar for sambho

Hi guys I have some problem regarding getting prime factors and distinct prime factors. I manged to get the prime factors but I got stuck on how to get the distinct prime factors.........I don't know how to select unique prime factors and print them....Help me out guys........ Thank you in …

Member Avatar for rajanpathak
1
917
Member Avatar for Dec28

Not sure why my comparisons aren't working between my input (text) and my several char arrays. I'm trying to get the user's input to terminate certain functions as you'll see below. I realise it's not the most efficient code but if there's anything obvious I'm missing please let me know. …

Member Avatar for Narue
0
209
Member Avatar for gyuunyuu

[CODE]#include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct { int count; // counter to use the word's occurrence char word[99]; } word; char str[99]; word myword[50]; int main() { FILE *myfile; if ((myfile = fopen("wordlist", "r")) == NULL) { printf("\n Error:Can't open file \n "); exit(0); } int position = …

Member Avatar for Adak
0
131
Member Avatar for Utsav Chokshi

Question:Write a program which prints " Testing C Skills" without no use of semicolon. I have found one answer : [CODE]1. #include <stdio.h> 2. void main() 3.{ 4. if(printf("Testing C Skills")) 5. {} 6.}[/CODE]

Member Avatar for rajeevpareek
0
86
Member Avatar for gyuunyuu

[CODE]#include <stdio.h> #include <string.h> typedef struct { int count; // counter to use the word's occurrence char *word; } word; int main() { word myword[50]; FILE *myfile; if ((myfile = fopen("wordlist", "r")) == NULL) { printf("\n Error:Can't open file \n "); exit(0); } char str[99]; int position = 0; while …

Member Avatar for kings_mitra
0
106
Member Avatar for Prisms

Hello I have been working on this program for a few days and have gotten stuck. I allow the user to enter in a string and remove special characters and turn upper case characters to lower case. after all that is done i compare the characters in the string to …

Member Avatar for Prisms
0
307
Member Avatar for MatGreenfield

Hi, I am writing a piece of code that takes copies the contents of one file to another (which is created by the code, the name is given by user as an arguement). I've managed to successfully open and read in the source file, and the program will create the …

Member Avatar for MatGreenfield
0
99
Member Avatar for shinsengumi

Hello all. I've previously created a working socket program in C in a 32-bit machine and now I have to transfer it to a 64-bit machine. May I ask if there is anything I have to change in my program to make it work in a 64-bit machine? I did …

Member Avatar for Ancient Dragon
0
600
Member Avatar for virendra_sharma

i have sample for to find out prime number , but i want to optimise is more. can anyone plz help me. int i; for (i=2; i < num ;i++ ){ int n = num%i; if (n==0){ System.out.println("not Prime!"); break; } } if(i == num){ System.out.println("Prime number!"); } thnaks in …

Member Avatar for Adak
-1
134
Member Avatar for coding101

I need to read a text file and change each character into morse code, then send it to another file. is there an easier way than having 26 different arrays associated to a different letter?

Member Avatar for Adak
0
88
Member Avatar for dem10

Hey I am writing a double linked list dictionary of sorts. All of my functions were properly (add element after, move pointer, search, etc.). However, something is wrong with my add before function. Initially it adds elements fine, however if I decide to move the pointer to a new element …

Member Avatar for thekashyap
0
159
Member Avatar for gyuunyuu

I'm supposed to read all the words from text file and use bubble sort to sort the word and count their occurrence. As I read each word from file, what is the exact thing I need to do? Do I need to store the word (as char array) somewhere to …

Member Avatar for thekashyap
0
205
Member Avatar for paulkinzelman

I've spent several days looking for info about precisely how to do DLLs and have found bits and pieces here and there but noplace that ties it all together. I'm thinking this could grow into a 'how-to' for DLLs which might be useful for others as well. I'd like to …

Member Avatar for paulkinzelman
0
305
Member Avatar for zetologos

This program keeps adds the sum of numbers you put in. You can also quit by typing in quit, its not case sensitive since I have code which converts all uppercase letters into lowercase. This in fact is the problem. For some reason when I insert a number it works …

Member Avatar for zetologos
0
257
Member Avatar for yoshitsugu

Can anyone fix my problem? I'm sure my getDate function algorithm was right, but it still wrong.. here is the code: [code=c] #include<stdio.h> #include<string.h> #include<stdlib.h> typedef struct{int day,month,year;}Date; typedef struct{ char name[31],gender; Date dob; }Student; void getString(FILE* x,char* y); Date getDate(FILE* x); char readChar(FILE *x); int main(){ Student pupil[100]; int …

Member Avatar for L7Sqr
0
185
Member Avatar for Firedown

So I have a program that runs a loop in main to call functions to show all seats with their name and to reserve seats. My code works fine to reserve a seat. But when I reserve a second/third/fourth seat the name I enter for that seat overwrites the names …

Member Avatar for WaltP
0
116
Member Avatar for ajayb

#include<stdio.h> #include<string.h> void fn (int *ptr) { static int val=100; ptr=&val; } main() { int i=10; printf("%d", i); fn(&i); printf("%d", i); getch(); } The output of the above code is 10 10. why not 10 100? What is happening inside fn?

Member Avatar for Adak
0
97
Member Avatar for f1r0z3

Hello... I'm trying to write a program in C (using POSIX library) where the parent process should fork up to M processes and play "connect four" or "four-in-a-row" with each-other until one of them wins, and when that happens, the process should terminate. This can be done either via pipes …

Member Avatar for Adak
0
213
Member Avatar for Truesteel

I am working on writing a program for my C programming class in which we have to make a basic program that can balance a checkbook. It prompts the user for a starting balance, can add and subtract amounts, and should deduct a $10 fee if the user overdrafts. The …

Member Avatar for jonsca
0
608

The End.