15,551 Topics
| |
[CODE]/******************************************************************************\ \******************************************************************************/ /******************************************************************************\ Include files \******************************************************************************/ #include "LPC214x.h" #include "pll.h" #include "vic.h" #include "Keys.h" //#include "armboard3.h" #include <math.h> #include "window.h" #include "adda.h" #include "sine.h" /* INITIALISATION COMPONENTS */ #define BufferSize 1024 // size of the buffer for // cosinus or sinus signal #define Threshold 10432 // threshold value for vector … | |
First,im sorry my bad english.I hope,i can tell my problem. there is a string: dizi[5]={1,2,3,4,5} and when program run, i want to change random place of members.i mean; first time program running: dizi[5]={2,4,1,3,5} second time program running: dizi[5]={5,3,1,2,4} 3th program running: dizi[5]={4,2,1,3,5} . . . etc.. always changes random.how i … | |
Hello guys , I am looking for a HTML parser in C/C++. I am trying to make a movie rater , which take name of movies from a folder and stores it in a file , then sort it according to their rating on net. So ,I am thinking to … | |
[CODE]#include<stdio.h> #include<math.h> int main() { float a,x,y,w,g,s,area,b,c,hg,radius,ho; printf("enter the value of one side:"); scanf("%f",&a); printf("enter the lengths:"); scanf("%f%f",&x,&y); w=2*x; g=2*y; s=(a+w+g)/2; area=3*sqrt(s*(s-w)*(s-g)*(s-a)); printf("the area of the triangle is:%f",area); b=(2*area)/(3*(w+x)); c=(2*area)/(3*(g+y)); radius=(a*b*c)/(4*area); ho=sqrt((9*radius*radius)-(a*a+b*b+c*c)); hg=(2/3)*ho; printf("the diatance is:%f",hg); system("pause"); return 0; } [/CODE] the area comes right but the distance hg shows … | |
Folks have asked numerous times for a code snippet of a binary search of an array. Here is heavily commented code with a few test printf() included to give you a picture of what is going on. | |
[CODE]#include<stdio.h> unsigned long int call( unsigned long int); int main() { int t=0,i; unsigned long int n; // scanf("%d",&t); while(t==0){ scanf("%lu",&n); printf("%lu\n",call(n)); //t--; } } long unsigned int call(long unsigned int n) { long unsigned int a,b,c,x,y,z,m,l; a=n/2; b=n/3; c=n/4; m=a+b+c; if(m>n) { x=call(a); y=call(b); z=call(c); l=x+y+z; if(l>m) return (l); … | |
[CODE] #include<stdio.h> #define MAX 4 main() { float A[MAX]; int i; for(i=0;i<MAX;i++) scanf("%f",&A[i]); return 0; } [/CODE] im using Visual C++ and doesnt give me any compilation error it keeps giving me a run time error after i enter the 1st number i can't figure out whats wrong :S help? | |
Why do we have to suffix long literals by 'L' or 'l' even though we have specified the datatype ? Does it serve any special purpose? | |
Hello, I need to implement a simple project: create a basic web-site to read online stream from my web-camera using its IP address. BUT I´d like to use my Arduino microcontroller and WiFly shield without using a laptop. Could please someone give an advise - links to related tutorials or … | |
Hello :) I have written a os in C and assembly, but my os is only a text based os. How can i make it into a OS with GUI ? | |
i want to go back to main menu while hitting escape key in my programme. for that i have make a function. [CODE]void exit (char[]) { if(char==27} { exit(0); } } [/CODE] but i have many user inputs which are of type int,float,char..... so i have tried, [CODE]while(kbhit!=27) { //coding … | |
This is the problem: Create a program that will create in adding of multiple exxpressions. Use while, do while and for loop. Here is how the output should be: (You should be enterring a number first) *for example I enterred number 5 1 + 4 = 5 2 + 3 … | |
I want to build a program for my c language project.What i need to do is that the user should enter the number of students,number of questions,correct answers,each students answers answers and then the program should calculate the number of correct answers,and their standing,the most wronged question . the problem … | |
Hi, I've been working on a project that needs to list all the drives on a computer (it's kind of a file explorer, but without using the standard one provided by windows). I've searched and found the function [URL="http://msdn.microsoft.com/en-us/library/windows/desktop/aa364972%28v=VS.85%29.aspx"]GetLogicalDrives()[/URL], which does exactly what I want. However, the return value is … | |
Hii everybody I was building RPC based server-client application I have a struct called event contains int type long int time I have a function in a server that `return (*event)` event * log_1_svc(event *argp, struct svc_req *rqstp) { static event* result; result = (struct event*)malloc (3 * sizeof (struct … | |
So my teacher asked us to make a problem. This was just passed to me by my classmate and this is the problem: [QUOTE]flow chart problem: a. Create a flowchart that will determine the sum of two numbers and if the sum is greater or smaller than 50. (0-50 less … | |
Hey I have been kicking myself with this problem for a week now and i was wondering if anyone can help. I am implementing cURL to fetch source code from a website. I am using fairly common code to do so. If I implement the functionality in my main.cpp, it … | |
Before looking at the code, here's an explanation: NIDAQmx is a hardware-in-the-loop integration software from National Instruments. They give this sample code to create any voltage out of the card. The variable "float64 data[1]" is a double precision floating point that defines the actual voltage being emitted from the card; … | |
Can you help me for the following problem: Implementation of a program in C that solves the problem of competition between the four processes that share the source of the network card with the semaphore method | |
[B]Hello everyone!![/B] I am new to Linux forum and have a question related to typecasting in C related to offset of structures.I have a piece of code and having a problem with this: [CODE]void fun(struct c *p) { int offset; struct b *address; offset=(char *)&((struct c *)(&((struct a*)0)->y)->j)-(char *)((struct a … | |
Hello Members, Can anyone please help me out with the concept of INSERTION AND DELETION OF ELEMENTS IN ARRAY.. I have understood the logic behind this, but i am facing problem with the coding thing.. i am not able to get it properly.. can anyone here pls help me out.... | |
hi i need to help me to understand this code how its work and depend on what it determine how many time yopu should enter values [CODE]#include <stdio.h> #define SIZE 100 #define SENTINEL -99999 #define TRUE 1 #define FALSE 0 #define READ 10 #define WRITE 11 #define LOAD 20 #define … | |
i have written following insertion sort program for a doubly linked list completely by myself.The the sort function is giving me Segmentation error and i am unable to figure it out...Plz help me out and forgive me if the code is too wrong to handle.. [CODE] //insertion sort using doubly … | |
this is my program but this is not working well.according to me a window should be created and some text will be written there.but the window is not working please can any one tell me why?and how can i eject this error. mind that compiler is running the program correctly.. … | |
hi i'm trying to download a zip file from a website then save it under C:\\ (directory) but when the file has been downloaded, and when i open it, it seems incomplete, besides why do i need to write in the file, i just wanna download it then save it … | |
If so, how? I would want to save it as a .jpg or .bmp | |
Hi, I use an msp430f16 and I want to calculate the execution time of a code (in milliseconds) any idea? thanks | |
Hi everyone, I wrote something like that: [CODE] book *library = NULL; customer *service = NULL; do { printf("**********MENU***********\n"); printf("* #1 List of books *\n"); printf("* #2 Add book *\n"); printf("* #3 Search by title *\n"); printf("* #4 Search by category *\n"); printf("* #5 Search by author *\n"); printf("* #6 … | |
hi, can anyone provide me the C code for login in screen.I m using C(borland)compiler and working on xp. The requirments are following- 1.Should accept user name as user-1,user-2 2.Accept password(should not displyed on the screen) 3.A case insenstive coparison is to be done for usname and password. 4.Login name … |
The End.