15,540 Topics

Member Avatar for
Member Avatar for flipjoebanana

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?

Member Avatar for flipjoebanana
0
85
Member Avatar for olsoul_41

Hi there I have a problem creating a slot machine game in turbo c++ because I cant get the value of the randomize number....

Member Avatar for Narue
0
123
Member Avatar for BioTeq

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 …

Member Avatar for Narue
0
109
Member Avatar for basukinjal

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 …

Member Avatar for bradd
0
93
Member Avatar for kishore84

[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 + …

Member Avatar for ArkM
0
145
Member Avatar for J-son

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 …

Member Avatar for J-son
0
88
Member Avatar for ambarisha.kn

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 …

Member Avatar for ambarisha.kn
0
253
Member Avatar for twburkle

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 = …

Member Avatar for twburkle
0
134
Member Avatar for rocosd

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 …

Member Avatar for Ancient Dragon
0
103
Member Avatar for shafaqmerchant

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.. …

Member Avatar for Ancient Dragon
0
26
Member Avatar for lxexlx

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!

Member Avatar for Salem
0
255
Member Avatar for ithelp

In [code=c] int main(int argc , char *argv[]) [/code] What could be the maximum length of string in argv ?

Member Avatar for ArkM
0
147
Member Avatar for ambarisha.kn

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. …

Member Avatar for ambarisha.kn
0
71
Member Avatar for PuQimX

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 …

Member Avatar for Aia
0
125
Member Avatar for rocosd

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; …

Member Avatar for ArkM
0
140
Member Avatar for plike922

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); } …

Member Avatar for Aia
0
83
Member Avatar for less123

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 …

Member Avatar for Aia
0
131
Member Avatar for -EquinoX-

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 …

0
64
Member Avatar for Hannahlv

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 …

Member Avatar for Salem
0
189
Member Avatar for dv1r

hello i want to write a programme that creates (lets say) 700 folders and numbers the from 1 to 700 and if its possible to take contents from a txt file to put after the number... if anyone can help me get started it would be gr8 i just never …

Member Avatar for Salem
0
104
Member Avatar for zabr

hi.. :) i'm a first year college student and just starting with turbo c. We have a project that is to be pass on August 29. I hope someone can help me cause i'm really having a hard time with this. I have to make an exe. of the program …

Member Avatar for Aia
0
114
Member Avatar for fromthatside

hello, I used to type my programs on console application.by C language and use these libraries , <stdio.h>,<conio.h>,<stdlib.h> .etc and used these function (printf),(scanf) under <stdio.h> library.. but then I wanted to know how they make programs on windows application by C language . I figure out they used another …

Member Avatar for ArkM
0
168
Member Avatar for fromthatside

hello , before 5 months I made a program by c language by borland c++ compiler v 3.1 . and it was run on console application.(dos). so. now i would like to make GUI program by vc++ 6 and this GUI program have a botton and when i will press …

Member Avatar for fromthatside
0
132
Member Avatar for Dawee1

Hello, I have problem to understand the code below: [code] #define LCD_DATA_REG (*(unsigned char*)( 0xC000 )) // Data Register #define LCD_CTRL_REG (*(unsigned char*)( 0x8000 )) // CTRL Register [/code] I know basics about pointers and I know how to understand pointers to functions, arrays, structures, int, ... However I don't …

Member Avatar for Dawee1
0
100
Member Avatar for james blake

Only C is the programming language that enables us with a high execution speed of programs among all other languages

Member Avatar for Salem
-3
57
Member Avatar for plike922

I cant find whats wrong to this program... im new to C... Please help. [CODE]#include <stdio.h> #include "genlib.h" #include "simpio.h" #define size 5 #define size2 3 void getArray (int numbers[][]); void checkArray (int numbers[][],int space[][]); int main() { int numbers[size][size], i, c, x, y; bool space[size][size]; for (i=1; i<size; i++) …

Member Avatar for Salem
0
257
Member Avatar for marcosjp

Hello there! I've built a simple server and a simple client in C (Linux). Among other tasks, I need the server to send the timestamp (using time.h) to the client. Then I need the client to change the system time based on the timestamp received from the server. What would …

Member Avatar for ArkM
0
234
Member Avatar for campuzcrazyness

hey guys, I would like to make a menu like this: MENU [A] - Addition of binary digits [B] - Subtraction of binary digits my option: [U]A[/U] [CODE]printf("Input upper addend: 1110"); printf("Input lower addend: 111"); [/CODE] sample output: sum is: 11111 ...how can I make it like that?

Member Avatar for iamthwee
0
102
Member Avatar for vijaysoft1

i am trying to take a input from user , suppose if user types "a bat and a ball and stick" if my array is [ICODE]data[10][20][30] = { {"a","and","apple"}, {"bat","ball"} };[/ICODE] from the sentence how i can count occurrence of "a" in the sentence ( ie , from users input) …

Member Avatar for Narue
0
119
Member Avatar for angelicxtc

Hi. I am taking my first C class and I seem to be having trouble with this program. The problem is: Write a function that adds two polynomials of at most degree n. /* f = g + h; n is the max degree of f, g, and h */ …

Member Avatar for iamthwee
0
778

The End.