15,552 Topics

Member Avatar for
Member Avatar for Katvillan

Please check my code, it has no error but there is something wrong.. I am trying to generate unique ten numbers from 0-99. then insert/store the generated number in an array(check[]) because later, after filling the array (check[]) with ten numbers, I am going to use it to another fuction …

Member Avatar for MrNoob
0
167
Member Avatar for furqankhyraj

i make that program but this program is giving an error please debug the error #include <conio.h> #include <stdio.h> int main() { int i; printf("This is the first line.\n"); gotoxy(10,4); printf("This is the second line.\n"); gotoxy(20,8); printf("And this is line 3.\n"); return 0; } Thanks,,....

Member Avatar for Ancient Dragon
0
165
Member Avatar for varunrathi

HI EVERYONE, I HAVE GOT A VERY INTERESTING PROBLEM THIS TIME. U HAVE TO FORM A PALINDROME OF AN ENTERED STRING. IT`S NOT THE UASUAL STUFF OF CHECKING WHETHER AN ENTERED STRING IS A PALINDROME OR NOT. IN THIS PROGRAM, SAY IF THE GIVEN STRING IS: "A3BCA" THEN THE PROGRAM …

Member Avatar for yellowSnow
0
191
Member Avatar for meghs007
Member Avatar for alvalany
0
72
Member Avatar for debolin

Please help me, I am trying to search a string from a structure which is in a text file, here is the code: void update() { char ask; fpt= fopen("records.dat", "rb+"); long int recsize= sizeof(customer); printf("recsize: %d", recsize); ask= 'Y'; while(ask== 'Y') { printf("\nEnter the Product Id to modify: "); …

Member Avatar for kvprajapati
0
95
Member Avatar for Curgol

Well as the title ... example: [code] string ss="this is an encrytpion program"; unsigned char temp[32]; //={0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f}; temp=ss //that's what i need ! [/code] Have converted the string to it's hex representation .. [code] char string1[64]="yeah …

Member Avatar for Curgol
0
2K
Member Avatar for Defaye

Ok I need help with this structure its now been split into header and main, I have added a function which runs after adding a new customer which is for writing it to a txt file, the program builds fine but once it gets to the part where it needs …

Member Avatar for Hiroshe
0
151
Member Avatar for EvilOrange

hi, its been a long time since i've had to work on c and i've stumbled. I'm basically trying to get a string[5] into a 2d array stringarray[10][1] [INDENT][CODE] char string[5]; char stringarray[10][1]; void workfunction(); int main(){ workfunction(); for(i=0;i<10;i++){ printf("%s", stringarray[i][0]); } } workfunction(){ for(j=0;j<10;J++){ //does something to get me …

Member Avatar for EvilOrange
0
119
Member Avatar for Lioshenka

Hello all, in time of need I always come here to cry for help) Anyways. What I need to do is to store data about people in a binary tree. They need to come from a file, but for now I can hardcode them in. To put it simple, I …

Member Avatar for Lioshenka
0
150
Member Avatar for yellowSnow

I'm still relatively new to these forums. I just like to put out a query regarding threads and their solvability. For Daniweb forums, is it considered good practice for OPs to flag threads that they have started as being solved if they have received appropriate posts that have answered their …

Member Avatar for yellowSnow
1
256
Member Avatar for Karthy
Member Avatar for 9868
0
120
Member Avatar for RobBrown

I am getting an error of "syntax error befor "else" " when i enter this code into the compiler: [CODE]#include <stdio.h> #include <stdlib.h> int main () { float Balance, creditDebit, newBalance; printf("This is your checkbook balancing utility.\n"); printf("You will enter your current balance followed by\n"); printf("checkbook entries. Use + and …

Member Avatar for yellowSnow
0
179
Member Avatar for makavelixx

Trying to figure out how to get this program to work, its suppose to prompt the user for the data then list the users data but for some reason is not compiling properly. [CODE]#include <stdio.h> typedef struct { int data; char firstName[30]; char lastName[30]; char street[35]; char city[20]; char state[3]; …

Member Avatar for makavelixx
0
95
Member Avatar for edenn1

this is my program: there are 2 problems : 1. i am not allowed to use atoi 2. there is a compilation error this is my code : #include <stdio.h> #include <stdlib.h> typedef struct companyStatus{ double balance; FILE *invF, *errF;}companyStatus; void printWord(FILE* file); FILE* openFile(char* name); char* getNextWord(FILE *file); char …

Member Avatar for yellowSnow
0
150
Member Avatar for kou yuuzhen

hello, i have an assignment to create and print a calendar programme the prob is, we have to add in various additional features in order to get higher marks since i'm new to C, i need help and suggestions to improve on my code also, can anyone please show me …

Member Avatar for yellowSnow
0
133
Member Avatar for Katvillan

I am doing a battleship game for my project. I am still trying to make a better algorithm.. This is what I have so far. Here is a code that will pick random coordinates for the computers ship, then draws the board and show where the ship is located... Assuming …

Member Avatar for wildgoose
0
194
Member Avatar for raseel

i have a project in numerical analysis course..to estimate thae data (xi,yi)i= for i=0,1,2,..,10 using clambed cubic spline ..where xi=i/10 and f(x)=y=(e^x) (sinx) and this can be done using c language or C++ or even any other programming language.. please help me 2 do this ..it weights 10 marks of …

Member Avatar for raseel
0
83
Member Avatar for Katvillan

This is my recursive code that will print numbers according to fibbonacci series.. My problem is I want the program to stack (store the numbers) numbers before the printing (in order starting with 3-21) but it should still be a recursive program. Can you help me, which part I should …

Member Avatar for deepugtm
0
230
Member Avatar for Pavan_

[CODE] #include<stdio.h> int main() { int a[100], i=0; while(1) { a[i++]=5; printf("%d\n",i); } return 0; } [/CODE] on gcc this code doesn't give ny error. but after printing the value of i upto 100 , it restart writing value of i from 6 onward... my question is how value of …

Member Avatar for Salem
0
127
Member Avatar for RobBrown

I am having a hard time writing a program to do the following: [QUOTE]Your program should create an array that contains ten (10) variables of the following type: typedef struct { char firstName[30]; char lastName[30]; char street[35]; char city[20]; char state[3]; int zip; char phone[15]; int accountId; } Customer; You …

Member Avatar for RobBrown
0
443
Member Avatar for taikoprogrammer

Hi everyone, I could really use some help on modifying this pointer program by Here are the directions I am given: Your task is to create the special functions used by this routine, which are shown in blue in the above program. The special functions are swapArgs, divideArgs, powerArgs, and …

Member Avatar for Dave Sinkula
0
153
Member Avatar for TheWhite

I have an unsigned char (8-bits wide, naturally) that contains 8 flag bits. Example: [CODE] unsigned char flag1:1, flag2:1, flag3:1, flag4:1, flag5:1, flag6:1, flag7:1, flag8:1; [/CODE] I would like to take this unsigned char and convert it into a bit array where each bit represents a flag. Pretty much like …

Member Avatar for TheWhite
0
1K
Member Avatar for wesduncan

okay for some reason I can't edit my other thread so I'll just make another one. Say I'm using this strtok, it runs like it should but I want it to print out the last string instead of the first when i do a printf at the end. [code] char …

Member Avatar for wesduncan
0
88
Member Avatar for wesduncan

Okay first post here, and I'm running into a problem. What I would like to do is read in files and have the user enter in the measurement they're looking for. This is what I have so far. [code=c]// switch.cpp : Defines the entry point for the console application. // …

Member Avatar for WaltP
0
95
Member Avatar for Curgol

I am trying to convert a hexadecimal character array to a binary array (unsigned char) that I can use in crypto functions using Cryptlib or OpenSSL. Basically I have a Hex representation of a key like (02726d40f378e716981c4321d60ba3a3) which as a character array is 32 characters but as a binary array …

Member Avatar for Curgol
0
483
Member Avatar for alvalany

hi frnds, I am new to programming. As i have to start learning languages, as my first step i decided to learn C as it is said to be the basic and most important. Can someone suggest me some way to increase my interest in C by giving examples of …

Member Avatar for sftwr21
0
196
Member Avatar for atreyeepal1

i'm tying 2 describe my problem here.plz solve it for me.. 1. generate a random number b2in 0 and 1 (r); 2. do t=r*2.5 ; 3. do w= t/100 4. keep track of all t1,t2,t3.... in an array and do the sum S=(t1+t2+t3......) ; 5. repeat steps 1,2,3,4, till S<100 …

Member Avatar for Dream2code
0
149
Member Avatar for MrNoob

well i alawys wondered when i make char name[]="bla"; and count by ptr it doesnt work it says cant count wrong argument to increment but see whenever i like make it a function like void putit(char *Name); it work i dunno why though why does it work then if its …

Member Avatar for MrNoob
0
102
Member Avatar for chat2fanna

Hi guys or gals , i'm in trouble with my class teacher, with in two days i have to finish my lab work .... i'm in need of c program using linked list my concept is 1. creating a linked list 2.Inserting a number in front of it 3.Insert a …

Member Avatar for wildgoose
0
143
Member Avatar for exia

Hi, I am learning C as a hobby. Was looking at a textbook that I got at the fair. They talking about basic types etc and have the following code: char ch; int i; i = 321; ch = i; printf("ch=%d\n",ch); so what I did was to compile it to …

Member Avatar for Salem
0
126

The End.