15,552 Topics

Member Avatar for
Member Avatar for plfgoa

Hi, I have been trying to profile code by putting in timing function at the start and end of the function(a function may call some other function and so on ) just before the return statement if the function returns something. The time is calculated in milliseconds. I wanted to …

Member Avatar for Salem
0
132
Member Avatar for ovais2k1

I need 2 programs in C language 1.Which create a Box and in a square box it takes input from user and print with in the box.I have made a program but when i take input the box corners are breaking from left and right side please help in in …

Member Avatar for ovais2k1
0
136
Member Avatar for bincy ashok

Assume that a language uses /* and */ pair for comments.Write a C program to check for balanced /* and */ pair in a given text file.Use pointer implementation of the data structure.

Member Avatar for WaltP
0
96
Member Avatar for A_Obrzut

[code] void HandleTCPClient(int clntSocket) { int recvMsgSize; char echoBuffer[32]; char test[32]; char reply[32]; memset(&echoBuffer,0,sizeof(echoBuffer)); memset(&test,0,sizeof(test)); memset(&reply,0,sizeof(reply)); if((recvMsgSize = recv(clntSocket, echoBuffer, 32, 0)) <0) { DieWithError("recv() failed."); } while (recvMsgSize > 0) { if(send(clntSocket, echoBuffer, recvMsgSize, 0) != recvMsgSize) { DieWithError("send() failed."); } if((recvMsgSize = recv(clntSocket, echoBuffer, 32, 0)) <0) { …

Member Avatar for A_Obrzut
0
109
Member Avatar for T&T

Hello, I need your help in this programme. The programme is explained in the attachment file. the main problems are: 1) how can I get specific data from a data file. (as required in 3,4,5 and 6) 2) how can I solve the problem of over written the data file …

Member Avatar for ithelp
0
64
Member Avatar for plike922

I am learn about using arrays and i need help [CODE]#include <cstdio> #include "simpio.h" #include "strlib.h" #include <iostream> using namespace std; #define Max 6 int main() { int power2[Max], i, n; for (i=1; i<=32; i++) { power2[i] = i; i = i*2; } for(n = 0; n<=Max; n++) { printf("%d …

Member Avatar for Aia
0
80
Member Avatar for omdnaik

Hii there Can ne tell me how to compile and run a C prog. using microsoft VC++... Till now i have been using Turbo C++ Compiler...

Member Avatar for Ancient Dragon
0
135
Member Avatar for loimarie

Hi!i need your help.please help me solve my assignment in numerical analysis,our teacher asked us to get the derivative of a function using turbo c programming language.I really don't have any idea on how to solve this. The equation would be like this [COLOR="Red"]f(x)=3x^2-5x[/COLOR].In this program, the user is asked …

Member Avatar for loimarie
0
157
Member Avatar for swamy kavitam
Member Avatar for Salem
0
58
Member Avatar for wussa

This is in c programming. The question is not with me right now but its like this, the program wants me to input 10 numbers and then find the average,total,maximum and minimum, Then print back the numbers according from lowest to highest. I'm having a bit of difficulty doing it …

Member Avatar for paragt
0
162
Member Avatar for keithmolo

Please let me know if this is possible or even remotely possible! I need to write to a file, but directly to hex. For example, if I write "2D" to the file, i want to be able to open the file in a hex editor and see "2D" in the …

Member Avatar for jephthah
0
188
Member Avatar for lynlyn

please help me with my problem... i have here a running program...but then you have to press the keyboard twice in order to input data.. can you help me to modify my source code???please..my future depends on you...-_- specification: Accepting data in the lists should only terminate only if the …

Member Avatar for jephthah
0
177
Member Avatar for Mr.UNOwen

Hello, This is similar to the thread I did a while back, except this time I need to do it under linux. I'm using the latest version of Ubuntu. Can some some one show me how to send information (an array of char) to the rs232 port (synchronous communication) . …

Member Avatar for jephthah
0
177
Member Avatar for death_oclock

I have the following globals defined (the relevant ones, anyway): [CODE=c] DWORD dwNumMaterials; LPD3DXBUFFER lpMaterials; LPD3DXMESH lpMeshBody; [/CODE] And the call to D3DLoadMeshFromX is here: [CODE=c] D3DXLoadMeshFromX(L"body.x", D3DXMESH_SYSTEMMEM, lpD3DDevice, NULL, &lpMaterials, NULL, &dwNumMaterials, &lpMeshBody); [/CODE] When this is called, it returns a generic error (0x80004005). Also, if it is needed …

Member Avatar for death_oclock
0
122
Member Avatar for mhil_joy

guys.. please check this program this is already running but i have no idea to insert a queue i need all your help guys as soon as possible. I hope that you will grant my request.. thank you... God Bless and more power.. [code=c] #include<stdio.h> #include<conio.h> #include<string.h> #include<iostream.h> #include<DOS.H> #include<process.h> …

Member Avatar for Aia
-2
82
Member Avatar for Clockowl

Hi guys, I've got two loops, and I want to be able to continue; the outermost loop when the innermost loop finds something. How would I do that? [code=c] //(...) for (n = startStorage; n < quadcount; n++) { if (!notOptimized(n, optimized)) continue; int *x = &quadindex[n*4]; for (eachX = …

Member Avatar for Clockowl
0
120
Member Avatar for Traicey
Member Avatar for mdew_47

I have posted the related topic in the Java forum! Now, i am having a very differnet problem altogether. 1. i am being able to call the C program from the Java frame using a "Button" in the inteface. 2. But the problem i am facing now is that the …

Member Avatar for Clockowl
0
98
Member Avatar for mancode1007

[ICODE] #include<stdio.h> struct student{ int id; char name[30]; int mark; }; void main() { FILE*fp; struct student stud; int id_no; fp=fopen("data.txt","r); printf("enter id no : "); scanf("%d",&id_no); while(fscanf(fp,"%d %s %d",stud.id,stud.name,stud.mark)!=EOF) { if(id_no == stud.id) printf("%d %[^\n] %d\n",id_no,stud.name,stud.mark); else printf("Error !\n"); } fclose(fp); } [/ICODE] Hello Everyone,I am stuck at the …

Member Avatar for jephthah
0
2K
Member Avatar for argus512

Hi People, I have been given to work on this program written some 15 years ago for data acquisition but i cannot figure out how to get this to compile as i am getting a lot of compilation errors. Any insight would be highly appriciated. Thanks in advance argus [code=c] …

Member Avatar for Ancient Dragon
0
180
Member Avatar for coolkeg

hi guys, I'm new to C language and am currently using an online tutorial, ive been doing prety well on my own until now. Basicly the problem is with the "while" command, when i copy and paste the code im working with from the tutorial site into a word pad …

Member Avatar for Aia
0
135
Member Avatar for plike922

When i run the program it shows the first line then blank i dont know whats wrong! [CODE]#include <cstdio> #include "simpio.h" #include "strlib.h" int main() { int i, d, t; printf("This program generates all perfect numbers from 1 to 100.\n"); t = 0; for (i=1; i<=100; i++) { for (d=1; …

Member Avatar for Aia
0
91
Member Avatar for symas

Suppose I have structure like: typedef struct { int a; int b; } my_struct; Is there any way to get/print the name of the fields of that structure (i.e. "a" and "b") programmatically?

Member Avatar for Radical Edward
0
273
Member Avatar for mancode1007

Hey guyz.. I want to know how to print certain line from the text file and certain part of the record for example data.txt... [CODE] 123 John Smith 80 222 chris brown 50 325 christine 60 [/CODE] I only want to print out the name from the record in the …

Member Avatar for Salem
0
123
Member Avatar for plike922

can you check the code... it doesn't work for some reason i tryied everything [CODE]#include <stdio.h> #include "genlib.h" #include "simpio.h" int Fibonacci(int fnum); int main() { int fnum; printf("Please enter in the Fibonacci number: "); fnum = GetInteger(); printf("The number for f(%d) is %d\n", fnum, Fibonacci(fnum)); system("pause"); } int Fibonacci(int …

Member Avatar for Aia
0
110
Member Avatar for sreesai

Hi, I want to know how to program to find memory leak. my idea is to find whether there is a free() for every malloc before exiting the function. x() { malloc() .... if() { abc return; // thr is a memory leak as thr is no free n we …

Member Avatar for dwks
0
127
Member Avatar for m_banerjeein

Hi All Guys few quick questions on C.. 1. What does "static void <function_name>(argument1,argument2)" means.. 2. Whether this would give a compilation error if i write this piece of code... int a =1 , b=2,c=3 ; (a=b)=c;

Member Avatar for jephthah
0
127
Member Avatar for me_roy

Dear All, I got difficulties here related with extracting max and min value from every column in array. So far i just can extract max-min value at a time by changing column index, stupid approach..eeeh, but i do it just for testing that code could extract right max and min …

Member Avatar for WaltP
0
433
Member Avatar for blrjohn

Hello guys, I m very much new on C. Need all of your help to improve. Right now I m getting one problem. I m writing the very basic program.. [code] #include <stdio.h> int main() { printf("Hello World!\n"); return 0; } [/code] When I complie it is showing success. But …

Member Avatar for Aia
0
119
Member Avatar for loimarie

hi to everyone!i need help for my assignment in our numerical analysis.our instructor asked us to solve a linear equation using turbo c language.Can anyone help me with this problem,a simple sample code will do.Ex.f(x)=2x^3+x^2

Member Avatar for jephthah
0
522

The End.