15,550 Topics

Member Avatar for
Member Avatar for thebluestar

here is my code [CODE=C] #include<stdio.h> #include<conio.h> #include<string.h> int main() { char A1[100], A2[100],c[100]; int n1,n2,i,j; printf("Enter string A1:\n"); gets(A1); printf("Enter string A2:\n"); gets(A2); n1=strlen(A1); printf("%d ",n1); n2=strlen(A2); printf("%d ",n2); char *p1=A1, *p2=A2, *p; p=(char*)malloc((n1+n2)*sizeof(char)); for(i=0;i<n1; i++) { *(p+i) = *(p1+i); } for(i=0; i<n2; i++) { *(p+n1+i)=*(p2+i); } int k2=strlen(p); …

Member Avatar for thebluestar
0
203
Member Avatar for Umar Ali

Hello I want to send a dns packet to a dns server. I've already connected to the dns server but not able to send the packet in the right wy. Actually I don't know how to send? Here's the code.. [CODE]#include <winsock.h> #include<stdio.h> #include<string.h> #include <io.h> #include <sys/stat.h> int main() …

Member Avatar for Umar Ali
0
470
Member Avatar for DazednAngry

Hello, I am new to C and am in need of some help. I am getting a warning, assignment makes pointer from integer without a cast. here is some parts of my code: struct BOARD { char *theBoard[8][8]; }; typedef struct BOARD Board; int main(int argc, char *argv[]) { Board …

Member Avatar for gerard4143
0
119
Member Avatar for Mehh

Well, im a beginner programmer, trying to make my own proggy in Dev C++ but i have massive problem with dialog, this doesnt work (using mdi example): mdi_unit.h [CODE]#define CM_WINDOW_TILEVERT 9084 #define CM_WINDOW_TILEHORZ 9083 #define CM_WINDOW_ARRANGE 9082 #define CM_WINDOW_TILE 9081 #define CM_WINDOW_CASCADE 9080 #define CM_EDIT_PASTE 9079 #define CM_EDIT_COPY 9078 #define …

Member Avatar for Ancient Dragon
0
221
Member Avatar for sahiilseth

Hi, I have been trying to read the data from a file, which looks like this, for some hundred rows: y x1 x2 x3 x4 x5 -1.120448885 1 0.333799767 0.488337281 -2.011297473 -0.097103584 1.981332002 1 -0.559282628 -0.775806971 1.739534174 -0.900925792 5.955490161 1 1.618560385 0.242730629 1.008987835 -1.092595567 here is the code I am …

0
44
Member Avatar for MrNoob

I got problem with this function for adding icon to a program with small programs it corupts it and with bigger programs it doesn't even do anything [code] #include <stdio.h> #include <windows.h> #define MIN 2 char *ReadFile(char *SzFile,int *BytesCount) { int fSize; FILE *pFile; char *Buffer; if(!(pFile=fopen(SzFile,"rb"))) return NULL; fseek(pFile,0,SEEK_END); …

0
67
Member Avatar for Creator07

Hello guys, I am doing a small C/C++ program(mainly for use in my father's work - Includes a batch processing inside a folder which is repetitive). I just need to find the number of files in a folder(not necessarily of a single filetype). What I thought was using [ICODE]system("dir > …

Member Avatar for varnesh_kp
0
291
Member Avatar for ankur_

How can we get the last error occured in linux. suppose there is a connect() func error in that case how to get the error that occured.

Member Avatar for dkalita
0
109
Member Avatar for flyballonfly

Hey Guys, I'm trying to read individual characters from a file, store them in two arrays then print out the arrays. The input file looks something like this 7 1 5 0 1 2 4 3 7 0 2 5 9 0 3 With the first number being the length …

Member Avatar for dkalita
0
83
Member Avatar for Hiroshe

Can anyone help me with doing problem 12 on project euler? The question is asking which triangle number has more than 500 factors. The first few triangle numbers are: 1, 3, 6, 10, 15, 21, 28 ... Hope you understand the pattern, cause a can't explain it in words vary …

Member Avatar for SVR
0
182
Member Avatar for riahc3

Hey I have a text file (1.txt) with the lines: This is line 1 This is line 2 This is line 3 This is line 4 This is line 5 and Im trying to read all the pair lines from that file and write them to another text file called …

Member Avatar for Gaiety
0
199
Member Avatar for saba_shakeri

Hi there! I need to write a function called intersect so that the program i have determines if 2 circles intersect. The first circle has centre (px,py) with radix pr and the second circle has centre (qx,qy) with radix qr. I have no idea how to go about with this …

Member Avatar for kvprajapati
0
85
Member Avatar for ankur_

Where can I find sample client-server program using poll. Or if someone has it can they share it.

Member Avatar for ankur_
0
148
Member Avatar for saba_shakeri

Hi im writing a program in C that will find the prime factors of a number. When i compile it and put in a number i dont get any thing Any idea what i did wrong in my code? #include <stdio.h> int main() { int n, k; printf("Enter the number …

Member Avatar for Grn Xtrm
0
87
Member Avatar for ylchen

Hi all, Here's the problem I have. clock() call returns 0 no matter when I call it.... Code: [CODE] #include <time.h> #include <stdio.h> #include <math.h> int main() { volatile double n, i, x; clock_t time1, time2, time3; int j; // while (time1 < 1) time1 = clock(); for (i = …

Member Avatar for ylchen
0
89
Member Avatar for Gaiety

Hi, if any one has the idea of the internal system calls which gets activated by using high level statements ( like printf ,scanf or malloc and so on) please provide me the links or any related info. i have an idea that the internal system calls depends on the …

Member Avatar for Ancient Dragon
0
196
Member Avatar for suncica2222

hi to everybody on this most helpful programing board I have trouble setting up Dev C++ compiler,I have a lot of errors in 100% right code so I guess that compiler isnt set right. I want to work in C. here's example: [URL=http://img27.imageshack.us/i/111111af.jpg/][IMG]http://img27.imageshack.us/img27/4492/111111af.th.jpg[/IMG][/URL]

Member Avatar for gerard4143
0
185
Member Avatar for fivec

Hello friends and gurus, this is my first post here. i have few basic C questions. is sizeof an opearator(i actually studied it as a operator but then not so serious about the things) 1.why is it called as an opeartor? 2.sizeof is compile time operator. what does that mean …

Member Avatar for Tom Gunn
3
156
Member Avatar for ankur_

Hi, Has someone got a code of skip list(in link list). Skip list is a list through which we can do binary search in a link list Thanks....

Member Avatar for ankur_
0
87
Member Avatar for teteret

hi...i have a project to do which simulates a calculator, quiz and chat session....i finish writing my code but i have no idea how to write the pseudocode since classes and functions are involved....can someone pls give me an example of a pseudocode that has both functions and classes cuz …

Member Avatar for chipepalf
0
140
Member Avatar for jupiterrise

Howdy, I have an assignment which requires that I get user input for 3 different variables, each in it's own function. These three functions are called by another function, which is called by main to begin with. Each of these inputs have a range that the input must be in. …

Member Avatar for dan63043
0
151
Member Avatar for cgaceta

Hey guys. Started C a couple weeks ago and I'm trying to learn how to implement functions. I need to make a function which returns a 1 if its a prime number and 0 if it isn't. This is the pseudo code given to us and I'm having trouble constructing …

Member Avatar for yellowSnow
0
118
Member Avatar for nhandal

I have a treeview in my program for which I am adding a bitmap of an open and closed folders. I have included messageboxes to show where the program fails. It fails at the loadbitmap function. I appreciate it if anybody can tell me what is wrong. Below is the …

Member Avatar for lashatt2
1
424
Member Avatar for starboy

Dear. everybody. when i progress the developing some functions using mysql db with vc++2005, i have the following problems i connected mysqldb and i runned the query to insert some records to my table in the DB, but i cant success in inserting. my sample code is followed as : …

Member Avatar for Ancient Dragon
0
70
Member Avatar for GadiK

Hi. I'm trying to debug a program that was written in Aztec C. I would like to use a familiar environment like VS2005. Is there any way to make VS2005 use the Aztec C compiler commands (from Aztec BIN folder)? If not VS2005, is there some way I can debug …

Member Avatar for Tom Gunn
0
189
Member Avatar for agr.pallav

i would like to know the way we can make user enter a number in a menu reply perhaps so that he doesnt have to press the enter key...........i.e. the program automatically proceeds with the give value and doesnt wait for an enter key to be pressed. its easy in …

Member Avatar for Tom Gunn
0
161
Member Avatar for ravikumar.be09

I have the doubt on eof concept,so please explain that with some example,............

Member Avatar for Grn Xtrm
0
32
Member Avatar for boydale1

I was given homework to write a program that finds if a double (64 bit) is negative. The double uses twos complement, so the first bit will tell if it is positive (0) or negative (1), but you all probably know that. The problem I am having is that there …

Member Avatar for yellowSnow
0
174
Member Avatar for navthekings
Member Avatar for navthekings
0
36
Member Avatar for needhelpe

I need a program that repeatedly asks for a real number, and then rounds it and output the rounded number as an integer. and it stops asking for real numbers when input 3.14

Member Avatar for Dave Sinkula
-1
196

The End.