15,551 Topics
| |
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 … | |
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. | |
[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) { … | |
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 … | |
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 … | |
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... | |
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 … | |
can any one give code for cpu scheduling algoritms (fcfs ,rr srtf,priority) in c | |
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 … | |
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 … | |
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 … | |
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) . … | |
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 … | |
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> … | |
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 = … | |
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 … | |
[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 … | |
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] … | |
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 … | |
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; … | |
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? | |
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 … | |
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 … | |
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 … | |
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; | |
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 … | |
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 … | |
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 | |
i created a header file named "pop.h" and saved in tc->include folder.......the codes included in header file is shown below [code]#include<stdio.h> #include<conio.h> int ssipower(int,int); void main() { clrscr(); printf("power=%d",ssipower(3,3)); getch(); } int ssipower(int a, int b) { int i,c=1; for(i=1;i<=b;i++) { c=a*c; return c; } [/code] when i tried to … |
The End.