15,551 Topics
| |
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,,.... | |
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 … | |
| |
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: "); … | |
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 … | |
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 … | |
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 … | |
| 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 … |
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 … | |
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 … | |
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]; … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
[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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. // … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
Does any one know how to get the index value in a 1 dim array of a returned character or integer? For example the value is 15 but I need to know where 15 is on the array, position a[0] or a[15] etc. thanking you in advance |
The End.