15,551 Topics
![]() | |
Hi All, I'm using gdb to debug a C code which does file processing. The file i'm processing has about 100,000 records. The code runs fine until the 30,000 records and after that it produces garbage value. Could i use gdb to run the code until it reaches 30,000 records … | |
Hi All, I'm running a C code on cygwin compiled with gcc, the code basically does file processing, it runs fine on my PC, but when run on a Solaris machine, it gives Bus error and core dumps. Is it a known issue? If not, is there any way i … | |
I have answered few multiple choice questions.I am sure i have answered almost 95% correctly. Maybe you guys can identify if i have committed any mistakes.Just identify not solve.I will solve them myself.Just a hint what is wrong would help as i want to be sure all answers are perfect. … | |
what is the syntax of returning a two dimensional to main function? | |
so im working in an environment (National Instruments) that auto-generates header files for the GUI. in my GUI, i have 150-some odd LEDs arranged in a matrix to represent a large relay bank. my LEDs are named and sequenced numerically like [code]PANEL_LED_1 PANEL_LED_2 ... PANEL_LED_150 etc...[/code] which would allow me … | |
Hi, i'm having the same problem here... I have to send a xml file from a server and receive 16 bin files for answer.. I know how to send string and etc.. and tried to use sendfile() to send at least the xml file.. but it didn't work out... here's … | |
Hi, I am trying to use this method: [URL="http://www.cs.indiana.edu/cgi-pub/oleykin/website/OpenCVHelp/ref/OpenCVRef_CxCore.htm#decl_cvCheckArr"]cvCheckArr[/URL] As a parameter I pass an IplImage and it compiles, but when I tried to run got this error: "Unsupported format in function: cvCheckArr .cxmathfuncs.cpp " I checked the above file and found from the code that it tries to convert … | |
Hi All, I am facing problems with free() API of ANSI. I am using Visual Studio 2005. I am using 2 char pointers. If i copy from one to another and after if i try to free source pointer, it is giving exception. How to debug this problem? Please help … | |
hey..will anyone tell me how to browse files and folders in a drive using C?? | |
Hello! I am rather new to c, and I am having a parsing problem. What I am trying to accomplish: I have a file filled with assignment statements such as: [CODE]var1=5 var2=80[/CODE]...etc. I want to parse through the file and then do a check to see if the variables exist … | |
Ok i know this has all sorts of issues, im getting tons of errors, any suggestion on where to start? [code=C] #include <stdio.h> #include <stdlib.h> typdef char byte; void memcopy( byte *to, byte *from, int count ) { while ( count-- > 0 ) *to++ = *from++ ; } int … | |
Hey guys. Trying to implement associative array with the help of libJudy. Here's small test, that doesn't work. Please, help me to find, where i did wrong? [CODE] #include <assert.h> #include <Judy.h> typedef struct { char *hash; int id; int views; } Watch_t; Pvoid_t dict = (Pvoid_t) NULL; PWord_t rcw; … | |
Do I do it like: [code=C] wchar_t *str = L"12345"; [/code] because that doesn't seem to be working. | |
hello the problem that i am facing is that whenever i click on the tc icon to start the compiler, the screen turns black first (which is normal). and then after about two seconds the compiler is exited from even without starting it. Even when i try running the exe … | |
I'm very new to C and am working on a card game. I've got my cards and shuffle down, but I want each card to have a name. I made my cards inside an array of structs: [code] struct card { int value; int suits; int points; char name[20]; }; … ![]() | |
hi, In my array arr={10,20,30,40} i want to display output like 10 20 30 40 10+20 10+30 10+40 20+30 20+40 30+40 10+20+30 10+20+40 20+30+40 10+20+30+40 How to display output like this?? how to do this please help me?? | |
I have two integer numbers. I want to find which number is greater than other one without using relational operators. | |
Arrange the following list of functions in ascending order of growth rate. If the growth rate of function f is less than the growth rate of function g, you write f < g. For functions having the same growth rate, use = to denote this case. Your answer therefore will … | |
Hello guys i began reading K&R but there problem in a code i dont really understand it here code of a sequeeze function [code] /* squeeze: delete all c from s */ void squeeze(char *buffer, int c) { int i, j; for (i = j = 0; buffer[i] != '\0'; … | |
Hello guys I m trying to code a program to fix indented code but problem is that i will use strstr to search for the for string then i ill read it till it encounted \0 then i wanna jump to next line to add 4 spaces before the code … | |
A problem asks me to make a printf statement which will print out the members of the struct given, I wrote a program to make sure I would get the right printf statement. [code] #include <stdlib.h> #include <stdio.h> int main() { struct house { 5. char style[40]; int rooms; float … | |
I have four arrays as input, then used it in a function that result an output. Then I sorted the output array. Next step, I want to find the index and the value of the input array that resulted the sorted array. I keep getting the wrong result. Here my … | |
Hello All, I have a C program where I have created a UDP socket and bound to a particular ip address and a port number. As the program proceeds, msgs will be sent to different clients using the [B]same socket, using the same port, but each has a different ip … | |
ok, I have a very serious somewhat simple problem that I just can't seem to figure out myself. Simply put I want to make a program take the lines Hello How Are You ToDay and output ToDay Are You How Hello Using the End of data marker as a newline … | |
Hi, What is the conversion character for long double in gcc? | |
hi, One of my freind is asking for bpsk modulator and demodulator. It's out of my domain knowledge and i'm not sure what is it about. Can you refer to some C language example codes of the above. will appreciate your quick reply thx | |
i want code for the follwing series 1 1 2 1 2 3 1 2 3 4 1 2 3 4 ..................n when we n as 2 it should display 1 1 2 when we gave n as 4 it should dispaly 1 1 2 1 2 3 1 2 … | |
Well i was looking in the paper the other day and they have this Word puzzle with a bunch of letters used to figure out what the quote of some famous guy was. Basically they take every letter of the alphabet and just change them and print it out and … | |
i dont understand why this isnt working ill post the code thats relevent for some reason no matter what numbers i enter it will just print out that the complex number is 0.00000... idk how to fix it heres the main function [code=C] #include <stdio.h> #include "globals.h" #include "complex.h" int … | |
this is an Object-oriented solution between ourselves of ai technique. Ai standard database chiefly contain: Main, Noun, Verb, Preposition Create database: Main. Create table columns 3 D memory x-axis, y-axis, z-axis, Class mark Input condition X Y Z Expected result X Y Z Reporting demonstration X Y Z Object enantiopathy … | |
Folks, I know we can use unsigned/signed int and char to define our own Boolean type in C. We can either use 0 or 1 to distinguish FALSE or TRUE or use TRUE as anything which is non-zero. Why can't I use float data type to define my own boolean … | |
What's the main difference between while(){ } and do{ }while() loops? From looking at it, it looks like the former evaluates before it performs the iteration and the latter does the evaluation after each iteration... is that correct? Why would I pick one over the other? Is it mainly just … | |
I need help making code that will create 4 different output files. All I know at the moment on this topic is how to fopen/fclose and the stuff in between however fopen requires the output file to be available before the program stars to run. Mabey theres an fcreate function … | |
Hello. I'm developing a encryption program. I'm testing with encryption right now. I use bitwise operators and also bitwise shifts. [OR [|], XOR[^], AND[&], NOT[~], right[>>],left[<<]] To add even more security, I went ahead and added bitwise shifts. Whenever I shift the numbers, they go over 256 [max int in … | |
Heya, i'm learning c at the moment and have a project i need to complete. I'd like to start of by saying that the course i'm on is pretty poorly taught. They taught us scanf printf basic arrays basic structures and fflush which doesn't even work on my compiler. We … | |
1.write a program segment that computes 1+2+3+...+(n-1)+n, where n is a data value. follow the loop body with an if statement that compares this value to (n*(n+1)) /2 and displays a message that indicates whether the value are the same or different. what message do you think will be displayed. … | |
[code]typedef struct item { int number; char package[20]; char start[20]; char finish[20]; int weight; int distance; }ITEM; int i = 0; int num = 0; while(fscanf(ifp, "%d %s %s %s %d %d", &item[i].number, item[i].package, item[i].start, item[i].finish, &item[i].weight, &item[i].distance) != EOF) { num++; i++; } rewind(ifp); printf("\n\nnum = %d\n\n", num); [/code] … | |
Hello, I am working on a project that involves creating both a client and server in C. The client must get from the user: A = int B = double C = int D = double Then it must send all the values to the server in one send. The … | |
hi all. i have read a text line from a file using [CODE]fgets() [/CODE]into a char array [CODE]char astr[30][/CODE] then i did [CODE]strcat(astr,"secondstring") [/CODE] The output of [CODE]printf (astr)[/CODE] is appearing on 2 lines instead on same line. plz advise me wat i did wrong. thanks. | |
I w'd like tom Download Turbo C (window version). Can any one sugget any site, thank in advance :confused: | |
[code=language] #include <string.h> #include <stdlib.h> #include <stdio.h> /* uni() function takes an array an thier size.and it produce an array which is include unique element */ int uni(char *arr[],int size) { int unique = 0; /* The length of dst after removing duplicates */ int n=size; char *dst[n]; /* The … | |
Sairam to everyone Good morning I am using AVR Studio to compile MuCOS II onto Micrium site. Micrium is the provider of all MuCOS II an RTOS for various ports. I had the following error : ../../os_dbg.c:25: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'INT16U' Addressing this line: … | |
Hello, I was wondering how I could connect to a server using the client that I wrote below, that requires a username and password. I'm a little confused when it comes to reading the man pages. [code=C] #include <arpa/inet.h> #include <errno.h> #include <math.h> #include <netdb.h> #include <netinet/in.h> #include <signal.h> #include … | |
Sairam all I had hard time with this particular problem. I have downloaded from Micrium Website MUCOS a RTOS. I used AVR Studio,and try to build the OS. But unfortunately I encountered this problem: --->" __root" is compiler directive for IAR compiler and this tells the compiler not to optimize … | |
Folks, I have been told that there is one logical problem with this code. Basically, this is an implementation of the library function strcat(). The intended beahviour of this function to concatenate ct to the end of s. Return s. I could not find any logical problems with the code, … | |
Hello. I am trying to do a project with linked lists. It seems that everything is coded correct in my code to create new nodes and move my pointers and such. But for some reason my function that is supposed to print all the names stored in my list only … | |
Hi, im lookin for a c function which will take hex values stored in two different integer variables say TH1,TL1 . So say TH1 has FF and TL1 has 00,then i need a program that will convert the effective value FF00 to decimal ,ie 65280 stored in a variable say … | |
i need help making a password program. it lets the use input a password and check it if it is following the password rules, which are the following: must have exactly 7 characters, only alphabets and digits are allowed. i don't exactly know how to put that in an if … ![]() | |
Hello guys, I am new to this forum, but I am sure I will be an active one as I am a computer science major. I am still kindof new to c programming and am hitting a major issue. I am writing a echo client server code and I am … | |
|
The End.