15,551 Topics
| |
I'm trying to send an char array through a function convert it to an int array and send it back so I can reuse it with another function. I'm just having the worst time with this matter, please help! | |
This a program i write for practice. The problem I'm facing is inside the while statement. Is it okay to divide, in this case, the miles(which is inside the the while) with gall(outside the while). I tried to compile it and the answer given was 0.00000 P/S. This program is … | |
im having trouble and cant find whats wrong... plz help [CODE]#include "strlib.h" #include "simpio.h" #include "genlib.h" #include "string.h" int main() { int i, high; string answer; printf("Think of a number in the range of 1-"); high = GetInteger(); printf("and I'll guess it:\nPlease use Y and N.\n"); answer = "No"; printf("Is … | |
I have tried to come up with a 2-D (4 rows and 4 columns) array which holds values from 0 to 15, with none of the values used more than once. I'm posting only the code snippet. please lemme know if the logic is correct. [CODE=C] int HIGH=16; /*(Max value … | |
I want to solve a puzzel game here we have 24 match stick there are two player user and computer, there is first turn to comp. there is one condition any player can pick minimum one to maximum 4 stick at a time . at last whose got only one … | |
I'm having problems with my do/while loop. It does not take the condition and simply continues the loop indefinitely. I have: [code=c] do { printf("Choose the base of the number to convert:\n\n"); printf("2 5 8 10 16\n\n"); printf("Enter option:"); scanf("%d", &baseFrom); system("cls"); if(baseFrom != 2 || baseFrom !=5 || baseFrom … | |
Hello everyone. Like so many others, I am new to programming. I am taking a course on Programming in C, and have hit a number of speed bumps. The assignment I am currently stumped on is: Let [I]arr[/I] be an array of 20 integers. Write a program that first fills … | |
Hello everyone, I am trying to devise a Binary Tree Representation of a Postfix Expression. I am sure I am in the right track, but there's just something wrong in my code which I cannot find. I am just wondering if you guys can spot where I made my mistake. … | |
hello friends can u tell me how to find greatest of three nos using bitwise operators? | |
Write a calculator program that lets users enter a simple mathematic operation and display the results as in the sample output shown below (bold text indicates user input). Calculate: 92+1 Result = Ninety Three Calculate: 92, 000 + 1 Result = Ninety Two Thousand Calculate: 92, 000.01 + 1 Result … | |
Can someone help me with this program.I had found that the output of this program should be the local time and display time and date and i dont know where my program gone wrong and display like this time is 03:29:30 date08/06/[COLOR="Red"]1[/COLOR]08 how to eliminate 1 from my program.it should … | |
Hello, Need pointer on how to create a for loop within gdb that will print something each repetition to a file so that I can view results. How would I go about doing this? | |
Hi there I have a problem creating a slot machine game in turbo c++ because I cant get the value of the randomize number.... | |
Hi everyone, I'm having issues while attempting to read a text file of the following structure [QUOTE] 0 0 -7.278289 0 1 1.922087 [/QUOTE] As you see the first and second values in a line are integers, I'm not interested in those, the third value is a float which I … | |
Ive written the following simple code to find the addresses of the varialbles [code=C] #include<stdio.h> int main() { int a; int b; char c; float d; printf("\nInt : %x\nInt : %x\nChar : %x\nfloat : %x",&a,&b,&c,&d); return 0; } /* OUTPUT Int : 12ff4c Int : 12ff48 Char : 12ff47 float … | |
[code=c] #include<stdio.h> #include <stdlib.h> #include <time.h> #include<conio.h> const int LOW = 1; const int HIGH = 150; int main() { int grid[30][30]={0},x,j,i,die; int data_points, tempx, tempy; for(x=0;x<150;x++) { tempx = rand() % 30 + 1; tempy = rand() % 30 + 1; data_points = rand() % (HIGH - LOW + … | |
The following program is to produce the sum of Even and Odd array element. The program works properly when I use int instead of double. But getting errors when using double. Could anyone tell me what is the problem? Cus I wan it by using double array. and I don't … | |
Hi everybody, I want to write enter in a text file. How to do this. I wrote the code as follows. see if i write like this, it is printing one special character like arrow. I want to print in the following line, instead it is printing in single line … | |
I am currently working on a program that takes input from a file and calculates the averages. I decided to just write the program they way I "thought" I could do it. [code]struct student{ char name[15]; double average; double score1,score2,score3; }; struct student num_students[50]; int main (){ int i = … | |
hello, A small doubt regarding the context related functions.. I did a makecontext to create a new thread. ( C program) But in order to execute it,I need to know the main parent thread so that I can swap both. How do i know the parent thread..? i want to … | |
hey everyone, this is shafaq... i need help plz..i'm a student...i need some one to make a progrm for me in C language of a personal assistant..in that you hv to include appointments, reminders, to do taskjs, list of clients etc... plz i rele need help and that also soon.. … | |
hi everyone, how are you! i need a c program to read a Segy format file. i hope that the program can output the trace header and seismic data information in ASCII format, who can help me ? Thank you very much! | |
In [code=c] int main(int argc , char *argv[]) [/code] What could be the maximum length of string in argv ? | |
I have input files like this a.iup b.iup c.iup....... i have these input files in a variable called fname; like this char *fname="c:\\iupfiles\\a.iup"; every time i will get file name in this variable. But how to concatenate the variable with some other name like as follows in output file name. … | |
somebody please help me to correct this coding program [code=c] #include <stdio.h> void readmarks (int* num1,int* num2,int* num3); void grademarks (int num1,int num2,int num3,int* num4,int* num5,char* grade); void printmarks(char grade); int main ( void) { int num1; int num2; int num3; int num4; int num5; char grade; readmarks (&num1,&num2,&num3); grademarks … | |
Hello , I am trying to create threads using makecontext function. The code is sth like this.. [CODE=C] #include "mythread.h" #include <malloc.h> #include <stdio.h> #define FIBER_STACK 1024*64 int mythread_create(mythread_t *new_thread_ID, mythread_attr_t *attr, void * (*start_func)(void *), void *arg) { // Get the current execution context mythread_t t2; t2 = (mythread_t)new_thread_ID; … | |
I having trouble... for some reason strcpy(b,a) is not working... it says b is not identified [CODE]#include <stdio.h> #include "simpio.h" #include "genlib.h" int main() { string a, b, c; printf("Please enter a word: "); a = GetLine(); b = strcpy(b,a); b = strrev(b); if(strcmp(a,b)==0) { printf("\n%s is a palindrome\n",a); } … | |
Hi guys , i m doing a programme that can read a text files that contains number, student's ID,1st exam and final exam marks and it can calculate the total of 1st and final exam in order to grade the students. the programme then prints out the calculated total marks … | |
My problem is this, whenever I give this code an input of <!--, it always runs it through the tag definition first that I made, instead actually i want it to run through the <!-- in the rule part that I made (the one that BEGINS S1 after that), how … | |
Hi, everyone! I want to make the user authentication for mysql database. I write the code and test it, but can't run. Let's I talk about my project idea first. I have a server, a client and a mysql database. Before entering the server, the user must login first, After … |
The End.