15,551 Topics

Member Avatar for
Member Avatar for Rmitboy

Write a function that reads an integer n and several lines of text (sentences between 150 – 200 characters). The text will be printed n characters per line, by adding extra spaces as evenly as possible. For example: Enter an integer (maximal number of chars per line): 10 Enter some …

Member Avatar for Adak
0
129
Member Avatar for dondajr

Well, here i am one more time. In previos post I asked here about read files. All of those problem were fixed, but now, i really have a problem that I don't know why is happing. In the first , i need to explain what my system will do: My …

Member Avatar for dondajr
0
87
Member Avatar for ROTC89

ok so i am making a program that has a master slave process. the master sends out the 2-d array which is 1000 by 1000 to the slaves. then the slaves calculate the sums of the rows sends back to the master who sums it all up. then the time …

Member Avatar for jonsca
0
1K
Member Avatar for Colin Mac

I have this C program with multiple files and I want to introduce a new file called enemy.c. and I'm wondering if I'm going about this right. game.h [code] #ifndef GAME_ #define GAME_ extern void game (void); extern void enemyFunc (void); extern int enemyPosX; #endif [/code] main.c [code]int main (void) …

Member Avatar for virgoptrex
0
181
Member Avatar for emilyhedgecock

Hi I am making an mp3 database at the moment and i have run into some difficulty when passing down the array to a function. I can do it when i create the array globally as obviously this means i dont have to pass it down, but i want to …

Member Avatar for Banfa
0
1K
Member Avatar for en12ic0

Hi, I'm trying to create a simple distributed system model in C where a central controller regulates the communication between several machines. The controller's job is firstly spawning client process in several hosts. In my understanding to do this you needs to have a connection with the target host but …

Member Avatar for jephthah
0
84
Member Avatar for ChrisXxX

Can anyone shoe me an example code to encode an entered password in C. for example: password=vista when displayed to the user on screen when entering the password it should look like this ***** Can someone show me how this can be done, thanks

Member Avatar for jephthah
0
65
Member Avatar for dondajr

Hi guy, i have this little program: [CODE] #include <stdio.h> #include <stdlib.h> #include <time.h> #include <string.h> #include <unistd.h> //Obtem o nome do buffer de trade baseado na hora char *btfile() { char *fname; fname = malloc(14); time_t t = time(NULL); struct tm *lt; lt = localtime(&t); strftime(fname, 14, "%m%d%H%M.tbf", lt); …

Member Avatar for dondajr
0
145
Member Avatar for Valdemar009

Hi Everyone, I'm really fed up of working on C in Windows Vista. First and foremost, the window of C occupies only half the screen which is very annoying. I've heard that there is a distinct C that is used with Vista but I have failed to attain any more …

Member Avatar for jephthah
0
158
Member Avatar for oggiemc

Can someone please tell me what im doing wrong in this program..im gettin a compiler error saying: C:\Dev-Cpp\projects\proto.cpp In function `int main(int, char**)': 46 C:\Dev-Cpp\projects\proto.cpp a function-definition is not allowed here before '{' token 46 C:\Dev-Cpp\projects\proto.cpp expected `,' or `;' before '{' token C:\Dev-Cpp\projects\Makefile.win [Build Error] [proto.o] Error 1 The …

Member Avatar for oggiemc
0
123
Member Avatar for sam_dev

hi every body....... here i want to ask something about base64 algorithm which is used for the encryption of passwords.........i just want to know that how it works ?????what are the functions used in this algorithm?????any type help.....any link...????

Member Avatar for jephthah
0
120
Member Avatar for ganesanronaldo

hey guys... Thanks for your help in my previous post. Havin another problem in my stack assignment this time.. Have done how much i could but there is a lil error in it.. Possible in the [B]convertip[/B] function... Hope i can get the help needed.. Thanks in advance...=) [CODE]#include <stdio.h> …

Member Avatar for ganesanronaldo
0
144
Member Avatar for TimCereja

I've been trying to read all I can about the %n conversion specifier, but I'm having trouble with it. In the following code, I generate ten random numbers between 1 - 1000 and save each to an element of the array. I need to use %n to keep a running …

Member Avatar for TimCereja
0
85
Member Avatar for priyankapandey

[CODE]#include<stdio.h> #include<conio.h> void** printA( int* , int ,int[][]); void printw(void*, int ,int); void main() { int num[3][5] = { {1, 2,3,4,5}, {6,7,8,9,10}, {11,12,13,14,15}, }; int* num_ptr[3]; void** ptr; printf("traversing by double pointer"); ptr=printA(*num_ptr,3, num); printw(* ptr, 3, 5); } void** printA(int* num_ptr[],int r,int num) { int i,j; for(i=0;i<r;i++) { *num_ptr[i]=num[i][0]; …

Member Avatar for priyankapandey
-3
73
Member Avatar for aianne

Hi! I need help to my Turbo C program.. I need to create a program that will ask the "Starting X:", "Starting Y:", Ending X:", and Ending Y:" on different shapes.. this is how the program should be: [CODE]SQUARE: starting X: starting Y: ending X: ending Y: CIRCLE: Starting X: …

Member Avatar for Top9ne
0
1K
Member Avatar for rsg31

Hi, i have this letters, A,R,V,G,M,N,B. And from those i need to get 4 of them randomly, bit i dont know how to do it, please help! :D

Member Avatar for thomas_naveen
0
182
Member Avatar for churni

hi guys, i'm frustrated at my piece of code for a heap sort function. i believe everything is correct but i am a hardcore beginner at c. i have made a rand.txt file with some floats in it in the form; 91.175598 68.562500 96.664803 29.593500 43.156502 34.241001 59.178200 85.542702 81.852798 …

Member Avatar for IsharaComix
0
88
Member Avatar for smi ensi

I should do programme in C , but I don 't know witch struct I can use.:( question : we have congresse , where there is 2 type of activities : activity 1 and activity 2 in each one there is many activities where many people are linked in :( …

Member Avatar for Ancient Dragon
0
134
Member Avatar for Talguy

I have created a icmp ping function but it doesn't always work due to the firewall of the computer I am trying to ping. I heard you can get around this using a tcp ping. How can i construct a tcp ping packet. I did a little research and it …

Member Avatar for Talguy
0
138
Member Avatar for lionaneesh

[CODE] scanf("%[^\n]",line); [/CODE] tell me the logic of this scanf statement and why " [^\n] " is used instead of %s ... and how this statement works... i know that this statement inputs lines till enter is pressed.. but what is the format of the scanf statements please tell..

Member Avatar for jephthah
1
327
Member Avatar for unbrknchane

Hey Guys, So I am working on a program in class that asks for the age of your dog and translates it into human years....needless to say overly easy and boring. So I want to get into adding sprites to C. My first question is where I can find some …

Member Avatar for jephthah
0
236
Member Avatar for alcx88

I am not sure what this means and I get it all the time. Can someone help me fix this code? [ char add_account(account_t a[]) 7 { 8 int i, N=1000000; 9 char ch; 10 char str1, str2; 11 int m=20; 12 13 for(i=0;i<N;i++) 14 { 15 if(a[i].number==0) 16 { …

Member Avatar for jephthah
0
2K
Member Avatar for MWE_QUE

Hello, and thanks in advance for any help I can get. This is part of a larger program for homework. Things were working when I called "addVacantStore" the first time before I wrote the search function. I then called it twice more to set up to test the search function. …

Member Avatar for Banfa
0
136
Member Avatar for Iam3R

Hi, I have written a program just to check the behaviour of the compiler. i expected an error in function call statement. but its not generating any error. the declaration of function we include to check the type of args and no of args and return value of function. but …

Member Avatar for Banfa
0
145
Member Avatar for alcx88

I am brand new to all this and I can't get my program to read the file from input. Here is my code. It says segmentation fault (core dumped) I'm assuming because fp is not getting the file information. Can anyone help? [code]#include <stdio.h> #include <ctype.h> #include <stdlib.h> #define getchar() …

Member Avatar for alcx88
0
247
Member Avatar for lionaneesh

Exercise 1-18. Write a program to remove trailing blanks and tabs from each line of input, and to delete entirely blank lines. I have no idea about this program . 1. first tell me the meaning and what to do in this question? 2. second provide me the source code …

Member Avatar for Ancient Dragon
-1
161
Member Avatar for sudiptamondal

[CODE]#include<stdio.h> #include"graphics.h" #include<stdlib.h> #include<conio.h> void main() { int graphdriver=DETECT,graphmode; int color,n,m; initgraph(&graphdriver,&graphmode); for(n=0;n<10;n++) { putpixel(250+n,350,BLUE); } for(m=0;m<10;m++) { int x=getpixel(250+m,350); printf("%d",x); } getch(); } [/CODE] I have to compile programs using graphics.h but i use Microsoft visual studio 6.0 . There is no graphics.h file in it... so i copied …

Member Avatar for hkdani
0
449
Member Avatar for aianne

Hi! I need help to my Turbo C program.. I need to create a program that will ask the "Starting X:", "Starting Y:", Ending X:", and Ending Y:" on different shapes.. this is how the program should be: [CODE]SQUARE: starting X: starting Y: ending X: ending Y: CIRCLE: Starting X: …

Member Avatar for WaltP
0
147
Member Avatar for lionaneesh

[CODE]#include<stdio.h> #include<string.h> int main() { int i,x; char c[100]; printf("Enter input :"); fgets(c,100,stdin); for( i = 0 ; i <= (x = (strlen(c))) ; i++) { if( c[i] = '\t') { c[i] = (' '); printf(" "); } printf("%c",c[i]); } }[/CODE] the aim of this program is that it will …

Member Avatar for Luckychap
0
139
Member Avatar for tquiva

I know I would first declare the input variable as char. But that just reads in the first letter of the word. How can I print or read each letter of a certain word?

Member Avatar for hkdani
0
162

The End.