15,550 Topics

Member Avatar for
Member Avatar for Onixtender

Hi, I have a problem creating one part of the program, Lets say we have a line (from data file): 333 hou 23se 444 bi 4g and the program should change to : house big deleting first number if there is one ,and changing word parts to numbers, and deleting …

Member Avatar for Onixtender
0
147
Member Avatar for its.romi

Added just to help other.... [code=c] #include<stdio.h> #include<conio.h> #include<stdlib.h> void createHashTable(void); void getData(void); void formatting(void); int insertData(int); int collision_OpenHashing(struct hashOpen*& ,int); int generateKey(int); void DispData(void); void DispHash(void); #define dataSize 15 #define empty -1 #define fail 0 #define success 1 struct hashOpen{ int item; struct hashOpen *next; }*head, hashTable[10]; int dataArray[dataSize]; …

Member Avatar for rizrash
0
114
Member Avatar for Crushyerbones

Basicaly I'm trying to do this [code=C] int create_student(student_data *student){ printf("Nome do aluno:\n"); fgets(student->name,name_limit,stdin); //wtf? printf("Número do aluno\n"); fgets(student->number,name_limit,stdin); printf("Aqui devia estar um nome %s",student->name); return 1; } [/code] Where student is a custom struct, student->name is char array. For some reason it seems to skip the fgets. Replacing with …

Member Avatar for Dave Sinkula
0
104
Member Avatar for sjgriffiths

Hello I was wondering whether someone could help me with the below I have a variable called: char company[50]; I have a string which contains: "STEPHEN JOHNSON LTD" I want to change the LTD to LIMITED How do i do this?

Member Avatar for Narue
0
64
Member Avatar for RedStarlight

I have been given some C code to compile which is several years old and need to compile it to see exactly what the program does. I know visual basic to an amount but i haven't touched C before. Anyway, how do i go about compiling the C code when …

Member Avatar for RedStarlight
0
138
Member Avatar for komany

Hello I have little problem with a code. I want to send information about a size on a file and uses “size_t filesize”. I will send this information thru a network called ”controller area Network” and uses the code stat = canWrite(hnd, 1234, size, 8, canMSG_EXT); in order to do …

Member Avatar for Ancient Dragon
0
162
Member Avatar for Drake

Data types are used to represent numbers and characters used in a program, why do programmers benifit from having such a variety? Also if anyone could help me out with what an unsigned character is used for? thanks for the help

Member Avatar for Narue
0
89
Member Avatar for nelledawg

I am so incredibly frustrated right now. I have seriously been sitting here for hours trying to figure out how to validate program input using ranges from a text file. My teacher gives us a lecture that is supposed to help, but the lecture doesn't even have a thing to …

Member Avatar for nelledawg
0
99
Member Avatar for cheesy_mel

Hi.. I'm want to read each record (in 1 line) using fread(), the problem is the record length is arbitrary.. e.g. 1 "Joshua" "Rosenthal" "34 Mellili Ln" "Earlwood" 1 "000113133121" 0.000 2 "Martin" "Serrong" "45 Rosenthal Ccl" "Doveton" 1 "000113133121" 0.000 3 "Jacob" "Leramonth" "59 Dalion Pl" "Belmont" 1 "000113133121" …

Member Avatar for cheesy_mel
0
120
Member Avatar for sfak271

I´m writing a program to find the divisors of a number, using the modulo function. my problem is, i´m supposed to use an array to "output" the divisors, and the output should stop when an empty cell is reached. I´m not very confident with arrays and don´t really know how …

Member Avatar for Ancient Dragon
0
269
Member Avatar for spec80

Hi, I am writing a problem that only works when a certain character is entered (either A, B, or C), and if that character is not entered, the program will loop around until A,B , or C is entered. So i tried the following code segment below, but even when …

Member Avatar for spec80
0
88
Member Avatar for KeeperOfTime

Hi I'm programming under DOS 6.2. I want to switch the polarity of the interrupt source 5 from "high active" to "low active" so an IRQ appears on a negative edge instead of a positive edge (or level, in my case it's edge). Does anybody know how to do this …

Member Avatar for KeeperOfTime
0
123
Member Avatar for pete212

Hello, I am trying to learn C and would like to create a program that opens a text file (already created) and reads out the words contained within onto the screen. Not to sure where to stat with this, please can someone give me some ideas? Thanks in advance.

Member Avatar for pete212
0
84
Member Avatar for Aamit

I want to read the registry of usb [COLOR="Red"]HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR[/COLOR] in this Name Type Data start REG_DWORD 0x00000003(3) when double click it gives value in Hex 3 How to read this value 3 or data 0x00000003(3) How to create this code in c language??? How to do it guys If any …

Member Avatar for Narue
0
92
Member Avatar for sanu_sharma

hi all, i am developing an browser in c from scratch, parsing i am able to doing and now in rendering i am facing some problem, so anyone have any Experience on webrowser in c help me out. thanks & regards sanjeev sharma

Member Avatar for Narue
0
22
Member Avatar for Afi83

[B]Hi there[/B] I am really new in C programming (about 3 weeks). Before I begin my question I have to excuse because of my bad English. My question is on reading a file that contains double and integer type numbers. For reading file I use fgets() that read a line …

Member Avatar for Afi83
0
431
Member Avatar for LightSystem

Hi there, Im new to this site, and I just have a question of something that I have been trying lately in the C language. I need to put a whole array in a shared memory file (using POSIX). I have no problems putting simple int* in shared memory. I …

Member Avatar for LightSystem
0
127
Member Avatar for pete212

Hi, need some help with this one. Here is the question: Compose an algorithm for a program that creates a list of words encountered when reading a series of text files. Write a program to open, and subsequently close, each input file, terminating should an attempt to open any file …

Member Avatar for Narue
0
213
Member Avatar for AWKTM

Hi all, I am new to Programming,can anyone guide me how to go about this senario, The requirement is like this, In a System there are 8 faults as below, Fault -Fault Code-Description INF1-26-unknown Drive rating INF2-27-for Unknown or Incompatible Power Board INF3-28-ISL communication Fault with Power Board INF4-29-Invalid Industrialization …

Member Avatar for AWKTM
0
98
Member Avatar for w0090463

Hi All, I need help to sort out my C Practical question. I am new to C and looking forward to do programming can some one help for the following. 1. How to write a program in c to calculate file size from KB to Bits? 2. How to write …

Member Avatar for ajay_kumar47
0
168
Member Avatar for abcd_nima

someone please help me to write a program that would replace all occurances of a substring in a string ,with a given string.if the input string is "the the the the",& if the substring to be deleted & the substring to be substituted are "th",&"ase" respectievely then the output should …

Member Avatar for Salem
0
87
Member Avatar for squint

Hello, I am a first time poster and not that familiar with HTML codes or uses. I did try to look this one up and could not find it. When I enter 26.2, it gives me 26.20001. I do not understand where that 1 is coming from. Thank you [CODE]#include …

Member Avatar for jephthah
0
113
Member Avatar for sonia sardana

Hey frnds, i have faced the interview question-- Suppose time is 11:00, What is the degree at this particular time??? Suppose time is 3:00, What is the degree at this particular time??? I have clue abt this question,plz reply.

Member Avatar for Salem
0
80
Member Avatar for komany

Hello. I need help with a thing. I have a file (sound file) I will send via controller area network and therefore can only send data about 8 byte or 8 vector as data [8]. This is sent away with the command sendfile () And I need help how I …

Member Avatar for komany
0
281
Member Avatar for wollacott

the last for loop i declared it inside, which doesnt work as a c program its c++ i need to declare it out side how do i do that? [CODE] #include <stdio.h> #include <string.h> #include <ctype.h> // Our function declaration saying it takes one string pointer and returns one string …

Member Avatar for Narue
0
178
Member Avatar for wsn

Hi, I'm trying to make this code works but with no luck so far, I have two problems 1. I'm reading from a file lines and then executing them but the last line goes into an infinite loop 2. Another problem is I don't think I'm using "wait" properly as …

Member Avatar for wsn
0
98
Member Avatar for Acquire

So I'm writing a program in C that reads in a bunch of words from an unspecified number of files and I'm to print out the top N words in the file. I'm using a hash to store them in, where each bucket is a linked list. The lists are …

Member Avatar for Ancient Dragon
0
132
Member Avatar for wollacott

You will read in a file supplied from the commandline (filename.ext,) and write/overwrite out a file which will be called (filename.ext.mng.) This file will be essentially the same as the original file, but will have all characters on all lines the reverse of the original. For example: The original file …

Member Avatar for Aia
0
128
Member Avatar for abcd_nima

iam a 1st yr b.e stucent.i was attending my c.p lab viva.i was asked to write a program that would exchange 2 variables without using a third variable.i could'nt do it.i know how to exchange the values by using a third variable.someone please answer this question.

Member Avatar for hammerhead
0
157
Member Avatar for edek

[CODE=C]int test[2]; pipe(test); FILE *to, *from; if ((to = fdopen(test[1], "w")) == NULL) return 1; //error: could not create stream if ((from = fdopen(test[0], "r")) == NULL) return 1; //error: could not create stream fputs("test text", to); char testBuff[5]; fgets(testBuff, 5, from); puts(testBuff); //This should display 'test' in console - …

0
56

The End.