19,876 Topics

Member Avatar for
Member Avatar for kiran islam
Member Avatar for sathish.b

good morning to every one....... How to use the %n in scanf () & printf()? ..explain in thoroughly with examples... thanking you for giving answer

Member Avatar for kvprajapati
0
88
Member Avatar for thebluestar

[CODE=C] #include<stdio.h> #include<conio.h> #include<string.h> int main() { //int a[10]={2,5,1,7,0,10,145,14,15,9}; int a[10]={1,2,3,4,5,6,7,8,9,10}; int tem,i=0,j,isTRUE=0; for(j=0; j<10; j++) { if(a[j]<a[j+1]) { isTRUE=1; break; } isTRUE=0; } if(isTRUE) printf("inorder\n"); else printf("ASEorder\n"); getch(); return 0; } [/CODE] Here's my source code about checking an array is ordered or not But it didn't work properly, …

Member Avatar for kvprajapati
0
6K
Member Avatar for eghtedari.amir

I want to know is there a complete divide function in C standard library that retrieves the quotient as a float number. in fact I want the remainder to be zero or be as next to zero as possible. Is there such a function? Thanks,

Member Avatar for Ancient Dragon
0
54
Member Avatar for restrictment

Hello all, I am currently making an rpg type game in C++. The code is bellow: [code] #include <stdlib.h> #include <time.h> #include <iostream> #include <fstream> #include <string> #include <windows.h> using namespace std; int main() { int person, opponent, atk, asuccess, msuccess, game = 1, counter1=1, level = 1, atr, a, …

Member Avatar for Clinton Portis
0
153
Member Avatar for rmcummings

I am new to C++ and am writing a program that will call other functions. I keep getting an error for a undeclared identifier for "vowel" in this section of code. Can anyone help? #include <iostream> #include <iomanip> using namespace std; void generate_random_vowel(char &vowel); int main () { char vowel; …

Member Avatar for rmcummings
0
189
Member Avatar for jodie121997

Hi all, I have the static variable g_listItem which is the header of the link list. I have created the generic API which will be used by other module and every time this API(add_info_node()) is invoked I want to want the node to this single link list which I declare …

Member Avatar for Gaiety
0
132
Member Avatar for dylank

Hi, I am a begginner programmer that is attempting to create a program that will spit out the (x,y) plots for a graph. Currently, I only need it to give me the x and y data in (x,y) form, so here is my current code. By the way, I am …

Member Avatar for jonsca
1
153
Member Avatar for ankur_

what is the time that select func in socket programming waits before continuing. Like till how much time it can receive msg from diffrent clients before proceeding to serve the request. One more question. Can we send 500 messages from 500 diffrent clients at the same time to a server …

Member Avatar for kvprajapati
0
104
Member Avatar for yasaswyg

I need help writing a program that randomly picks a point in a 2D space. Then the user will be allowed to make repeated guesses which point was picked with feedback saying if the user is hot or colder on each guess. Thank you!

Member Avatar for yasaswyg
0
89
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
204
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
474
Member Avatar for dylank

Hi, I am trying to read a webpage, namely a PHP page that returns "true" or "false" depending what $_GET (Or is it $_POST?) information is sent. The URL it attempts to read will look like this: [ICODE]www.thesite.com/key.php?key=the_key[/ICODE] and the page will return a true or false. I currently have …

Member Avatar for dylank
0
1K
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
122
Member Avatar for ashwini jadhav

hi, i am new in programming. i know that c++ used in development of games.so,i want to also some simple games to develop.please give some question for developing game? thank's

Member Avatar for ashwini jadhav
0
93
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
222
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
46
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
68
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
297
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
121
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
86
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
185
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
202
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
87
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
157
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
89
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
91
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
198
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
191
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
160
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
89
Member Avatar for rechene
Member Avatar for Unix*
-4
105
Member Avatar for kazit

Hi I have a problem which i cant seem to solve or font really know where to start im only starting learning c# so dont have a lot of experience. Basically my problem is that i intend to loop through a directory of .tif images which contain BW and Colour …

Member Avatar for rajishms
0
197
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
144
Member Avatar for racumin

Hi, from my understanding, if you initialize an object without the "new", it will be only saved in the stack. If the method exits, the object is destroyed. Is that correct? What about this code? [CODE] int main() { string xxx = getText(); cout << "from main() " << xxx …

Member Avatar for mrnutty
0
133
Member Avatar for dlayante

I am just new in C#, somebody can you give me code for MS SQL server connection, on how to call records, add, edit and delete records...THANK YOU

Member Avatar for DanielGreen
-1
126
Member Avatar for dylank

Hi, I was hoping someone could help me with a C++ string problem. I currently have my program open up a file, read the contents into a string, and then I am trying to look for certain key characters in the string, like < and </. In short, I am …

Member Avatar for Clinton Portis
0
384
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
159
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
121
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
428
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
72
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
195
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
164
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
35
Member Avatar for srmcsclab

// try out //Program - 5.4 # include <iostream.h> # include <conio.h> void main ( ) { int x[5] = {1,2,3,4,5}, y [5] = {5,4,3,2,1}, result [5] = { 0,0,0,0,0 }; int i= 0; while (i++ < 5) result [i] = x [i] - y [i]; clrscr ( ); cout …

Member Avatar for tomtetlaw
-3
294
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
195
Member Avatar for navthekings
Member Avatar for navthekings
0
38
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
197
Member Avatar for jeeter19

I have been given an assignment where I have to create a small shell that the user will be able to enter in a path and 2 parameters. The shell must be able to process this input and run the program at the given path using execvp, and must also …

Member Avatar for Ancient Dragon
0
297
Member Avatar for riahc3

Hey I know gcc is problably the best natural complier for C but Im looking for a IDE. I cant use Visual Studio 2008 (which Id like to) as it uses it own compiler. I was using wx-dev (I believe it is called like that) and it is pretty good. …

Member Avatar for jeeter19
0
395

The End.