15,540 Topics

Member Avatar for
Member Avatar for mixmagz

HERES THE CODE: [CODE]#include <iostream> #include <conio.h> using namespace std; int main() { int a,b,c,d; cout << "Enter Four Digit positive number: "; a = getch(); cout << char(a); b = getch(); cout << char(b); c = getch(); cout << char(c); d = getch(); cout << char(d); cout << "\nOutput:\n"; …

Member Avatar for mixmagz
0
150
Member Avatar for SecLoRum

Can someone help please. I have search all the forums about my problem and i cant find answer to it. -Decided to post a thread. Its about making a lotto program in C using only loop control structures and decision control structes( if..etc.). and most importantly random function. ' :-/Don't …

Member Avatar for Jason Giggs
0
115
Member Avatar for DJSAN10

If the main() takes 3 arguments i.e. int argc,char * argv[],char *env[] and SINCE C DOES NOT SUPPORT FUNCTION OVERLOADING ,y does the c compiler does not give error for simply void main() //that is no arguments at all OR void main(int argc,char *argv[]) //2 arguments

Member Avatar for DJSAN10
0
192
Member Avatar for salvador01

hi! im a newbie and i want to learn more on C i have a problem and i have no idea on how to add a 5 digit number example: input is 12345 and the output of 12345 is 15. please help on this one.

Member Avatar for prvnkmr194
0
109
Member Avatar for onus

Hi, here is a simple puzzle to which I have made a program, A C program to take bondectory name as command line argument and print last 3 directories and 3 my_files in all subdirectories without using api 'system' inside it. suppose directory bond0 contains bond1, di2, bond3, bond4, bond5 …

Member Avatar for Trentacle
0
209
Member Avatar for yuri1969

Hi, I'm fighting with [B]make[/B] for hours and I rly don't know where is my problem. I need to have a static lib libxml.a and an application (make.c) which uses it. I tried to compile it under GCC 4.4.5 and 4.5.0 and the compilation run fine. But under GCC 4.3.2 …

Member Avatar for Martin B
0
2K
Member Avatar for aplh_ucsc

Hi.. I want to get the memory addresses of an array.i'm having a compilation error with this code. [CODE] #include<stdio.h> #include<stdlib.h> #include<unistd.h> int isu[1000]; void dhanu(void *(isu+996), void *(isu+995)); int main(){ *(isu+998)=isu; *(isu+997)=(isu+10); printf("%d\n",*(isu+998)); printf("%d\n",isu); dhanu((isu+998),(isu+997)); } void dhanu(void *(isu+996), void *(isu+995)){ printf("%d \n",(int *)(isu+996)); printf("%d \n",(int *)(isu+995)); [/CODE] error …

Member Avatar for aplh_ucsc
0
108
Member Avatar for shanki himanshu

hi guys...actually m in deep trouble.i have to make projct in turbo C. but i dont have any time left.Can ny1 help me. can ny1 send me projct so dat i cant lose my marks. plz help meee...

Member Avatar for Kamatari
-8
130
Member Avatar for Don_k

In C I have created a program which can archive multiple files into an archive file via the command line. e.g. $echo 'file1/2' > file1/2.txt $./archive file1.txt file2.txt arhivedfile $cat archivedfile file1 file2 how do I create a process so that in my archivedfile I have: header file1 end header …

Member Avatar for Don_k
0
191
Member Avatar for onus

[CODE]#include<dirent.h> #include<stdio.h> #include<stdlib.h> #include<sys/stat.h> int main () { struct dirent **namelist; int i,j; char userd[20]; struct stat statBuf; printf("Enter a directory %s\n",userd); scanf("%s",&userd); printf("the dir is %s\n",*userd); i=scandir(".",&namelist,0,alphasort); printf("enter a directory name %s",*userd); printf("scandir returned i=%d\n",&i); if (i<0) perror("Scandir failed to open directory I hope you understand \n"); else { …

Member Avatar for lvl99
0
384
Member Avatar for kapilsolanki84

hello, can any 1 please help/guide me for creating an program .exe file in C. as i am using Dev c++ compiler.say for E.g( program of addition in this by compiling & running it i get the required output. but if i dont want to run the program again n …

Member Avatar for sharunkumar
0
3K
Member Avatar for Joey_Brown

Hello I was wondering whether is it possible to create a .txt file or check if a .txt file exists inside the folder earlier defined as a path. Basically I have a path : [CODE]#define some_little_file "/User/Joey/Desktop/" [/CODE] and I would like to create and manipulate a txt file there. …

Member Avatar for Joey_Brown
0
90
Member Avatar for Hey90

I have to create a database with the data stored in a .txt file. Each record is for a company with the following fields: Name, Place, East(km), North(km). Each record from the file needs to be read into a struct array. I have managed to read the records into a …

Member Avatar for Adak
0
791
Member Avatar for kayhantolga

[IMG]http://letscoding.files.wordpress.com/2010/12/4.jpg[/IMG]Something goes wrong but I can find it!! plese help!! run program and enter from 12 or larger [CODE=c] //Tolga Kayhan © 2010 //Let'sCoding #include <stdio.h> #include <stdlib.h> //Pascal triangle in this example contains int factorial(int); int C(int,int); void space(int); void writer(int,int); int main() { int last,sender; do{ printf("Enter a …

Member Avatar for kayhantolga
0
137
Member Avatar for hunkadarsh

i guess i need real helpp for my mini project at college,please help me executing this problem. Also thr is an .cpp attachment file used in Turbo C , Please help [code] #include<stdio.h> #include<conio.h> #include<graphics.h> #include<bios.h> #include<stdlib.h> int gd=DETECT,gm,ctrl=-30,x_location,y_location,rear=-1,maxx,maxy; int in_key,ctr[1500],nc,xr=0,yr=0,sp=15,err=0,scr=0,i=0,front=0; int size,x=0,y=0,dx_location,xctr[1500],yctr[1500]; char pattern={1}; main() { /*function to initialise …

Member Avatar for indraginanjar
0
968
Member Avatar for dipanjanpal

I am currently running Windows Vista Servicepack1 amd I am using C-Free4.1 compiler. plz check the C code...[CODE] # include <stdio.h> # include <windows.h> # include <winreg.h> main() { HKEY hkey; RegOpenKeyExA(HKEY_LOCAL_MACHINE,"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run",0,KEY_ALL_ACCESS,&hkey); RegSetValueExA(HKEY_LOCAL_MACHINE,"Testing",0,REG_SZ,"HELLO",5) ; RegCloseKey(HKEY_LOCAL_MACHINE); } [/CODE] Plz help me with this code or suggest me some good codes in …

Member Avatar for ckoy
0
224
Member Avatar for surajitsweet021
Member Avatar for WaltP
0
149
Member Avatar for vedro-compota

Hello )) please tell me - where's the bug in this code - [ICODE] main() { short int n = 0; n=[U]getdet[/U] ( **m , n); } [B]short int ** [U]getdet[/U] (short int **m , int n) /*вычисляем определитель матрицы*/ { short int c=0; if (n==1) return **m; }[/B][/ICODE] compiler …

Member Avatar for vedro-compota
0
182
Member Avatar for funky_sourabh

Hello, i want to know how to write a function in c which is similar to getch() but i can write the wait time. i.e it doesn't wait till the carriage return like getch() but proceeds with further execution of the program if no input is received for x no …

Member Avatar for WaltP
0
20
Member Avatar for dan76

Hi Guys, I am working on developing a simulation program that tracks multiple vehicles entered by the user and copy the current location of that vehicle in the specified text file. For example, If the user inputs 3 then the program must generate 3 text files for each vehicle and …

Member Avatar for myk45
0
216
Member Avatar for Azar Mohamed
Member Avatar for Dave Sinkula

Very early on when attempting to learn programming in C, you often do exercises that read in and print out strings and numbers. Now you might assume that C has a simple function that will get user input, and indeed it does, but there are a couple of gotchas that …

Member Avatar for WaltP
10
8K
Member Avatar for neo2nate

please help I want to reading .wav file and putting ito inot the array to do some manipulations.... here is the bit of the code, I am trying to read the file called yes1.wav and putting it into the array and it returining junk...sometime cannot open the fp1 = fopen( …

Member Avatar for Trentacle
0
620
Member Avatar for banders7

This program was developed and tested in the XP environment, so the requisite platform is Windows. It demonstrates some basic sound file manipulation techniques using the Multimedia Control Interface (MCI).

Member Avatar for Azar Mohamed
-3
3K
Member Avatar for phobos666

Hi, I need to open a file containing string values one below the other and display them. I'm able to open the file but there is some error while displaying them. Below is my code, kindly guide me to my mistake. [code=c] FILE *fp; char airfoil[6]; fp=fopen("/cygdrive/d/airfoil.txt","r"); if(fp!=NULL) { while …

Member Avatar for vinitmittal2008
0
211
Member Avatar for hsetaknev

[CODE]#include<stdio.h> void main() { int i=1,j=1,n=9; printf("enter the char"); scanf("%d",&n); while(i<=n) { while(j<=i) { printf("%d/0",i); j++; } printf("/n"); i++; } }[/CODE] OUTPUT 1 22 333 4444 55555

Member Avatar for vinitmittal2008
-1
133
Member Avatar for shinsengumi

Hi all. I'm trying to develop a Winsock program in C. I can already compile the program correctly but I don't get any output when I run it. I don't know how to exactly use the WSAStringToAddressA function so I think it's the root of my problem. I'm using this …

Member Avatar for cool_zephyr
0
196
Member Avatar for omkar1987

WHEN I TRY TO OPEN FILE IN APPEND MODE ,IT CREATES THE FILE BUT IT SAYS "IN-VALID ENCODING " ALONG WITH THE FILE-NAME ........I HAVE PASSED THE ARRAY OF STRINGS CORRECTLY IN string moreover the strings in "string" are sorted .....any string in "string" is made up of only 4 …

Member Avatar for Narue
0
171
Member Avatar for vedro-compota

Greetings to you friends)) Advice please - how to get integer value from the console? I did so, but nothing good can come out - [CODE] short int n = 0; n = (int)getchar();[/CODE] thank you in advance for your reply ))

Member Avatar for vedro-compota
0
242
Member Avatar for malli123

Hi, I want to create a text file with the name as SYSTEM DATE... for example---28/04/2008:9:11:50.txt The File name should be allocated dynamically. Can you provide the c code for this? Plese help me.

Member Avatar for malli123
0
143

The End.