15,551 Topics

Member Avatar for
Member Avatar for Little E

Can anyone help me write a program that will print a sentence using 5 different words that are in 6 different array's based on a random number generated by the computer. Right now my code will print 5 sentences using each elimate from each array, but it doesn't pick the …

Member Avatar for CPLUSCPLUS
0
532
Member Avatar for betaven75

Hi guys, This is my very first thread. Now I would like to know about file handling. I have got this book, but the concept is still not that clear to me. So, can you guys suggest any online material that would help me in this regard. Also, could you …

Member Avatar for Narue
0
90
Member Avatar for soosai

hi there ..... would like to know how would be the coding for password generation of different sets of characters... thanks u

Member Avatar for echocoder
0
97
Member Avatar for Ints

I have a c program that I need to use in dos 5 but i havenĀ“t found a way to do so .Programs that work perfectly in Win XP console window, will not work in dos.Does anyone know : What do i have to add to my code so it …

Member Avatar for jephthah
0
128
Member Avatar for electromania

Hi, Im reading a file, with 2 columns. this is working such as [code] 1999 5848946 2000 5458445 2001 5757585 2002 7699865 2003 7459758 2004 5797054 [/code] as Im reading I want to be able to count how many rows I've read and also add the all values as im …

Member Avatar for electromania
0
101
Member Avatar for fruitkiwi

This code is provided as shown in below Now i would like to simplify it and hope someone can share wif me . Thanks [COLOR="Green"]Instruction User is required to enter a Roman number to be converted Decimal number. The symbols used in Roman numeral system and their equivalents are given …

Member Avatar for jephthah
0
189
Member Avatar for fruitkiwi

This is a question i copy from others,and i write the code but nid u to help figure out problem. User is required to enter a sentence in English to be transformed to Pig-Latin form. To transform a word to Pig-Latin form, the first letter of the word beginning with …

Member Avatar for jephthah
0
157
Member Avatar for tvisha

Hi all I tried to run this code on C and I m gettin this error can anyone help me solve it ? also what is an intializer in C? what does it mean when the error says in line 5 about expected intializer before C? "C:\TurboCPP\c_work\DECQDER3.C|5|error: expected initializer before …

Member Avatar for Majestics
0
651
Member Avatar for lemichelle

Hello, From within a function, I'm trying to give data to certain members of a struct that I created. The struct also has an enum type that I created in it. Say this is the struct and the enum: [code] typedef enum {cat, dog, rabbit} Animal; typedef struct { Animal …

Member Avatar for lemichelle
0
92
Member Avatar for g_loughnan

Hi guys, I haven't a clue why this won't compile! I think the compiler is confusing multiplies as pointers. Here's my code: [code=c] #include <stdlib.h> #include <stdio.h> #include <math.h> #define pi 3.14159265; double data[] = { -0.15709,-0.25413,-0.1545,-0.011505,-0.052141,-0.24125,-0.28251,0.020464,0.48291,0.69804,0.46961,0.019997, -0.26036,-0.22194,-0.059284,-0.027764,-0.14373,-0.21843,-0.14153,-0.030971,-0.060482,-0.19966, -0.217,0.037288,0.41287,0.58642,0.40239,0.036834,-0.19954,-0.1839,-0.06484,-0.042241,-0.13189,-0.18949,-0.12998, -0.044059,-0.064511,-0.16527,-0.1656,0.048371,0.35412,0.8441,0.76091,-0.086579,-0.56076,-0.38969, -0.0037447,0.066327,-0.19043,-0.35463,-0.18658,0.055369,-0.015147,-0.35243,-0.4718, -0.038401,0.66734,0.99976,0.64583,-0.038856,-0.43599,-0.32307,-0.031074,0.023928,-0.17255,-0.29875, -0.16944,0.016309,-0.037833,-0.29157,-0.36583,-0.0038886,0.56681,0.834,0.54992,-0.0043523,-0.33768,-0.2678, -0.048722,-0.0065075,-0.15722,-0.25426,-0.15463,-0.011604,-0.052198,-0.24126, -0.28247,0.020554,0.48303,0.69817,0.46973,0.020092,-0.26031,-0.22194,-0.059329,-0.027849,-0.14384,-0.21855, -0.14164,-0.031061,-0.060533,-0.19967,-0.21696,0.037369,0.41298,0.58653,0.4025,0.036919,-0.19949,-0.1839,-0.06488, -0.042318,-0.13199,-0.1896,-0.13009,-0.044141,-0.064557,-0.16527,-0.16556,0.048444,0.35422,0.84421,0.76101, -0.086502,-0.56072,-0.38968,-0.0037807,0.066258,-0.19052,-0.35473,-0.18667,0.055296,-0.015189,-0.35243,-0.47177, -0.038335,0.66742,0.99986,0.64592,-0.038786,-0.43595,-0.32307,-0.031107,0.023865,-0.17263,-0.29884, -0.16952,0.016243,-0.03787,-0.29157,-0.3658,-0.0038291,0.56689,0.83409,0.55,-0.0042893,-0.33765,-0.26779, …

Member Avatar for g_loughnan
0
100
Member Avatar for jephthah

okay, experts, i need help. i can't seem to replace characters in a file, like i thought i would be able to: here's an example code. i put print and error stuff in there to try and debug. everything seems to be working ... except that my filename is not …

Member Avatar for jephthah
0
245
Member Avatar for soosai

how to run a c programme on password checking programme parallely..thanks a lot

Member Avatar for jephthah
0
78
Member Avatar for severman

hi all could any 1 knows how to add color to printf? i mean that i want to write a sentence with color in it. thanx!

Member Avatar for zdaxxy
0
125
Member Avatar for ithelp

Can you please suggest a code optimization tool for C other than the compiler ?

Member Avatar for Narue
0
63
Member Avatar for wsn

Hi, Can someone please help me in this,,, i'm trying to write this program but i keep getting a segmentation fault . I think the problem is from the outerloop but i don't know how to fix it. I have a file for example my file contains hello world I …

Member Avatar for Ancient Dragon
0
73
Member Avatar for electromania

Hi Guys, I'm trying to read a while with the following formate 1999 43558047 2000 59068567 2001 67098709 ......................... ........................... I'm not sure how many records are in the file. Now I want to read this file using struct mystruct { double x; //this would be first column double y;//this …

Member Avatar for Ancient Dragon
0
94
Member Avatar for Nessie

Hi all The string_in function below is intended to take two string pointers as arguments and if the first is contained in the second, return the address at which the contained string begins. [CODE=C]#include <stdio.h> #include <string.h> #define TEST "This ain't a drill" char * string_in (char * str1, char …

Member Avatar for Nessie
0
115
Member Avatar for knight fyre

When is it better to use random-access ? When is it not? When is it better to use sequential-access? When is it not? So far I'm only sure to use random access in a situation where I'm dealing with a fixed number of records. For example a record of rooms …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for wsn

Hi, if i had a string (Iamhere) stored in an array of characters, and i want to get just (amhere) in another array, is there a way of doing it?? I've been reading in the string functions but couldn't figure out how this is done? Thanks

Member Avatar for Aia
0
108
Member Avatar for Drake

can anyone tell me what makes C a universal language and ideal for a number of engineering solutions? Part of an assignment would be ace if someone could give me a few pointers

Member Avatar for sDJh
0
104
Member Avatar for melystar

Hello, I'm a newbie to C. I'm trying to understand a source file about insertion sort and shell's sort, but when I try to run the programme on Microsoft VS C++ expressed edition, it always comes out with this error message! sort_main.obj : error LNK2019: unresolved external symbol _insertion_sort referenced …

Member Avatar for melystar
0
159
Member Avatar for Drake

please explain What are the following data types are and the storage requirements of each? -Char -Unsigned Char -Int -long -float -double Would be great if someone could help me out, thanks

Member Avatar for Salem
0
101
Member Avatar for coolerfantasy

Hi Guys Can Pointers In C Points To The Video Memory And Write A pixels On The Screen Or Calls Bios 10H To Do That , What About That : void far *scr = (void far *) 0xA0000000L

Member Avatar for Narue
0
147
Member Avatar for pete212

Hi, i'm a newbie to C and currently trying to learn the language, so at the moment i only really know the basic stuff. I'm trying to create a program that converts a decimal number (entered by the user) into hexidecimal. I have got it working for one single, decimal …

Member Avatar for WaltP
0
148
Member Avatar for degamer106

I'm almost finished with this program but the problem I'm having is with freeing the memory I allocated. Particularly in the area where I have pointers to strings. [CODE]#include <stdio.h> #include <string.h> #include <stdlib.h> /////////////// user defined data ///////////////////// struct State { char * name; // state name int year; …

Member Avatar for John A
0
99
Member Avatar for one1082

I have no clue why this isn't working! Basically, I've got my tree and everything working, but now I need to fit it to the input the instructor gave me. What I need to do is read the first part of a line and then input each following term into …

Member Avatar for jephthah
0
127
Member Avatar for knight fyre

I'm trying to create a function that searches through all the beds in a hotel until it finds one that is available or just ends when all the records are searched. When it finds that bed, it updates that bed record with new information (marking it as reserved or occupied). …

Member Avatar for Aia
0
279
Member Avatar for knight fyre

I'm having a problem maintaining the data in the file. Everytime I enter a person's data the display code I have only displays the first one I entered. I'm not sure if there's somethin wrong with the creating or populating or just the display code I'm using [CODE=c]void addReserve() { …

Member Avatar for Ancient Dragon
0
95
Member Avatar for vardhani

I want to know a small c code to generate random numbers.It could be within a certain range. I want to know if rand() function will generate a random number

Member Avatar for jephthah
0
129
Member Avatar for mohanvamsi_18

How to Convert Binary String of Length 1024 to its Respective Decimal Number. for example 101 of length 3 and the respective Decimal Number is 5 10111 of length 5 and the respective Decimal Number is 23 like this .. i have a binary number of length upto 1024 ... …

Member Avatar for mohanvamsi_18
0
109

The End.