15,552 Topics
| |
Hi, Could anyone tell me, how to convert scancode to an equivalent ASCII char. in C language. Vijay. | |
I am not very good at algorithms and i will have a test about backtracking these days ! I don't know where i can find the code of backtracking in C and a good explanation about it. Thanks for attention! | |
i find this clock() function can be used to find the execution time between two particular statements in the code.... how to find it for the entire program,,, i mean right from the time the program is loaded and other OS and compiler related stuff............ | |
"We can also have null statements by just including a ; or let the switch statement fall through by omitting any statements (see e.g. below). The default case is optional and catches any other cases." i found these lines about the switch case statement in a site.... i couldn't understand … | |
Hello, Please do anyone among you know about c software execution optimization.. thanks | |
i found that the limits of int and short int are the same........ i just want to know then what is the need of 2 with the same limits.... | |
Hello again people, I've got some questions about timing that I hope can be answered by someone. I'm trying to use the functions [I]getrusage[/I] or [I]times[/I], or the [I]time[/I] command to time my programs. Now I've got this piece of code that uses getrusage, and my first question is a … | |
i have to find two time stamps one at the begining of main and at the end of main and take the difference to find the time elapsed to execute the code in between.Can anybody suggest the programs or proper API s in Linux. | |
[INLINECODE]#include<stdio.h> void print_message(void); void print_message(void) { printf("This is a bug\n"); } int main() { print_message(); }[/INLINECODE] I'm using VS 2005 SP1+SP for Vista on Vista buisness and as I wrote in Title when I have functions in my programs and I start debugging F10..F11, and debugger encounter a function instead … | |
hi.. i need help with this program. this is a program to turn 'ON' and 'OFF' 1 LED using 2 push buttons. the underline statement suppose to wait for button press. but it is alway false even i have press the button. is there any one who can tell me … | |
Hi.. I'm new in programming microcontroller in c. And I was given an assignment to write a simple program to turn 'ON' and "OFF' the LED by pressing push buttons. The microcontroller i'm using is PIC18F4620. And i'll need 1 LED and 2 push buttons to program this. I have … | |
Hi, I've just started data structures....I'm studying Breadth first search and depth first search algo....Though I got some idea about them but after spending hours I can't understand the exact difference between them Which one is better ?? Please help me out | |
I am starting out, trying to learn come C programming over the summer (I've had experience in Java for over a year) and I got a problem when I use my compiler. I am using Dev-C++ and everytime I run my program it quickly closes. Now I know I can … | |
Is there any other code written for a coke machine program. We’ll start by having the user “insert” their money. Since they can’t physically insert the money, we will just ask them how much they wish to insert and we will keep track of how much money they have inserted. … | |
Hi everybody, Can anyone among you let me know.how can i find execution time of an algorithm in my c coding!! thanks Nalini | |
Hi I would like to know if there is any certification in C available....like Sun certification for Java?? | |
Hi, I have a problem with the function [code]i=(abcdario[g]+h)%27;[/code], because i need to add this, but it gives me the error "invalid operands to binary +" The full code is the following [code] #include<stdio.h> //fopen() ,fclose() #include<stdlib.h> //malloc() int main (int argc, char*argv[]) { FILE *entrada, *salida; int caracter(unsigned char … | |
Greetings! I'm wondering if anyone has a kqueue outgoing socket example. What I mean is something that uses kqueue and connects to somewhere (in the example, let's say 1.2.3.4 on port 1234), and then polls the socket and when it gets data, calls the function receive_data(data), with data being the … | |
[red][b]Shell Sort[/b][/red] [code] void shellSort(int numbers[], int array_size) { int i, j, increment, temp; increment = 3; while (increment > 0) { for (i=0; i < array_size; i++) { j = i; temp = numbers[i]; while ((j >= increment) && (numbers[j-increment] > temp)) { numbers[j] = numbers[j - increment]; j … | |
i'm having this problem and i would like to ask for some ideas on how i will read a file backwards, that is, from end, read the file backwards(forward, naturally) by line.. thanks | |
[code] #include<stdio.h> #include<stdlib.h> int main() { struct { char origin[50]; char destination[50]; char flight[10]; char aircraft[3]; char days_of[7]; char departure[4]; char arrival[4]; char begin_date[10]; char end_date[10]; }flight_details[1679]; FILE *fp; fp=fopen("iaschedule-07(edit).csv","r"); char buf[50]; int i; while( fgets(buf,sizeof(buf),fp) != NULL) { strcpy(flight_details[i].origin, strtok(NULL,",")); strcpy(flight_details[i].destination, strtok(NULL,",")); strcpy(flight_details[i].flight, strtok(NULL,",")); strcpy(flight_details[i].aircraft, strtok(NULL,",")); strcpy(flight_details[i].days_of, strtok(NULL,",")); strcpy(flight_details[i].departure, … | |
well can any one help me with the internal representation of float and doubles ......i know tht they are stored using the IEEE 754 format so is that the reason why a double 0.7 is greater than a float 0.7 ????? | |
Dear All, Many thanks for the answer of my first question though i had the answer for this from one who has already put this question forward.I have modified it and it has worked.Thanks!! Now i want to optimize my coding by adding another condition so that it doesn't perform … | |
I am trying to write a code that asks for the user first and last name and concatenate the function displaying the user's lastname and then firstname example: bob allen // first and then last name allen, bob // last and then first name using the concatenate function: This is … | |
Is this the right way to use fgets when its for non file input. [code=C] #include<stdio.h> int main() { char userinput[256]; printf("Enter a string:"); fgets(userinput,256,stdin); printf("%s",userinput); return 0; } [/code] | |
Hello guys, It's been a while since I last time posted in this forum. I have strange problem regarding matrix allocation. I was asked to write code that includes 2D array dynamic allocation. I write two version of matrix allocation. Here is in my opinio relevant part of the code: … | |
Hiz well i m new in here n i m goin to have exam after 3 days :S i got stuckd in a question Q) Write a program to print the product of even numbers..... plz i m new with c langauge :S n i m having final exam jst … | |
Hi every=one, This is in continuation to my last post. Eve after initialising the 2d pointer a, as suggested, the same probllem as described earlier persists. Plz help -Jishnu. Hello, The code below calculates the determinant of the matrix. I know that the method of global 2-d pointers is a … | |
I wrote this function to generate random numbers and return it to the calling function [code=c] int getCard(void) { int range; int card; srand(time(NULL)); range = (10 - 1) + 1; card = rand() % range + 1; return card; } the calling function is.... int first2(void) { int firstCard; … | |
I've been attempting to teach myself some C, as I have been tasked with maintaining a program written for a handheld barcode scanner that appears to be written in this language. (At least, I'm assuming that for the moment, considering the fact one of the first statements I saw when … |
The End.