15,540 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
Only C is the programming language that enables us with a high execution speed of programs among all other languages | |
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++) … | |
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 … | |
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? | |
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) … | |
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 */ … |
The End.