15,540 Topics
| |
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"; … | |
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 … | |
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 | |
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. | |
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 … | |
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 … | |
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 … | |
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... | |
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 … | |
[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 { … | |
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 … | |
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. … | |
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 … | |
[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 … | |
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 … | |
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 … | |
i want to know how % operator use for 4%10 produce the result 4 | |
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 … | |
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 … | |
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 … | |
Hai friends how to connect the Mysql in C please reply | |
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 … | |
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( … | |
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). | |
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 … | |
[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 | |
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 … | |
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 … | |
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 )) | |
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. |
The End.