15,552 Topics
| |
[COLOR="Green"]Hello Friends... i made this Queue Program in c and its working good.. But I want to make it circular Queue please give some ideas..[/COLOR] [CODE] # include <stdio.h> # include <conio.h> # include <stdlib.h> # include <string.h> # define QSIZE 5 typedef struct{ int head,tail; char names[QSIZE][30]; }QUEUE; void … | |
Hey everyone. I have a problem with 2 strings i need to compare. My code is the following [CODE] if((*(fixedparkpnt)).name == pname) { //do stuff }[/CODE] I am trying to make a search proceedure based on a name given by the user but the condition is always false. I have … | |
[COLOR="Red"]Hello All Would you plz tell me how I can force a process to sleep for a specific period? i.e. I need an instruction similar to (Thread.sleep) Regards.[/COLOR] | |
I would like to achieve a speedup for this program. I was wondering how to get started. I was thinking of maybe using pointers. Any hints would be great. [CODE]void test() { int i, j, k; for (i=0; i<N; i++) { for (j=0; j<N; j++) { for (k=0; k<N; k++) … | |
Since __uuidof is a C++ only operator, how would I retrieve the GUID of an object in C? | |
what is the best way to read a file format as below: titleone 5 jim john brian george bill titletwo 5 abc qwe zxc asd etrwe titlethree 5 lkj mnb oio uyu trwww titlefour 5 dfg lksjdf alskdj oipopi iuiuy Need to create a dynamic 2d array with title as … | |
I need to write a c program which takes a algorithm as the input and gives the equivalent c source code as the output.any ideas???? | |
Hi I'm trying to create application using C and GDI. I want my EXE file to have an ICON, so I created .bmp file (64x64) and added to resource file. Then I created HICON hIcon using that bitmap image (CreateIconIndirect(...)) Now my problem is, .EXE file still has the default … | |
Hi All, I need to format my USB memory card using C code .But i don't want to call any system commands for that .And the process should not throw any confirmation window like " Are you sure Y/N".Plz help... | |
Hey all; I need to know the memory layout in detail of a c program. Since I have been unable to find out in google the exact things that I want to know I am going to write them here. Please correct whichever is wrong. Thanxxx Assuming a stack going … | |
Hi, I have to create a structure for student record and save their data, but I am having trouble in storing that data. This is what I have: [CODE] struct student { char id[7]; char firstname[20], lastname[20]; char phoneno[15]; char address[100]; dobtype dateofbirth; }; int main(int argc, char *argv[]) { … | |
[B]Hello Friends.. I need suggestions to make my this program better...[/B] [COLOR="Red"][B]Implementation of a STACK(containing names) as an array, with its basic operations PUSH,POP & SHOW[/B]..[/COLOR] [CODE] # include <stdio.h> # include <conio.h> # include <string.h> # include <process.h> # define STACKSIZE 5 typedef struct{ int size; char names[STACKSIZE][20]; }STACK; … | |
[CODE]void List_Student_Details() { FILE * output_list; output_list = fopen("StudentDetails.txt", "r"); if(!output_list) { system("cls"); printf("This File Cannot Be Open Successfully!!\n"); printf("Please Check It!!\n"); exit(-1); } else { system("cls"); printf("\n"); printf("************************ STUDENT DETAILS ************************\n"); printf("\n"); i = 0; while((fscanf(output_list,"%[^|]", &Summary[i].studNo)) != EOF) { fscanf(output_list, "%[^|]", &Student[i].regNo.year, &Student[i].regNo.campus, &Student[i].regNo.school, &Student[i].regNo.level, &Student[i].regNo.serial_number); fscanf(output_list, "%[^|]", … | |
Hi, i keep getting a segmentation fault and i cannot figure where the problem is, well the problem is in the while loop but not sure what is wrong with it. Question is enter a line of words with spaces then tokenize them and print in reverse. Here is the … | |
This is the Header file [CODE]#ifndef STUDENT_H #define STUDENT_H // class Student definition class Student { public: Student( char *nPtr ); ~Student(); void displayGrades() const; Student addGrade( int ); static int getNumStudents(); private: int *grades; char *name; int numGrades; int idNum; static int numStudents; }; // end class Student #endif … | |
So does this code adequately satisfy this question? Write a function named tokenize() that will receive the following parameters: a char * to the string to tokenize, and a char * [] that will receive pointers to all of the tokens generated, in their order of generation. The function will … | |
Hello I have a question regarding this program in c. My assignement is as follows : *read the angle in degrees *convert that angle in radians *Apply the formula for calculating cosine function with factorials *Then, automate the above calculating procedure by using loops *Afterwords calculate the absolute error between … | |
Hi sorry posting as a threat here, but i cound find any other relevant secion. I have learned c++ and i want to lear c languege, and I want find good book to lear from. could anyone recommend one please? thank you | |
Dear all, First of all I must say that I have just started with C. I've been doing some Java and C# as well but not very much of them too. In my new course of C, which goes on much rapidly than one can catch something, I am given … | |
I'm having issues with this checkbook program. The probelm is when I deposit money into the balance it still shows me the old overdrafted balance. I am thinking that it has to do with my: [CODE]bal += CreditDebit;[/CODE] Here is my code so far: [CODE]#include <stdio.h> #include <stdlib.h> int main … | |
This is what my program is supposed to do: [LIST=1] [*]Print the vector (m1) [*]Print the matrix (m2) [*]Multiply the vector and matrix together and display results [/LIST] The only thing wrong with my program is that I can't quite get the right results displayed. The correct display of values … | |
I am trying to use a vla (variable length array) in my code but I see that the array is not initialized properly when I debug the program. Here's the code : [code] #include <stdio.h> #include <stdbool.h> int main (int argc, const char * argv[]) { // insert code here... … | |
hey this week my assignment is like this write functions for inserting and deleting elements for an ascending priority queue .implement as un unordered list and an ordered list. as usual our teacher told us to read about priority queue from any good book.i have very vague idea about priority … | |
In ANSIC use semaphores and mutex? How to exchange messages between the programs? | |
Hi everybody. I need to pass the value of a pointer to a struct for a server program to a client program. my code is the following for the server: [CODE] write(ns, &fixedparkpnt, sizeof(fixedparkpnt)); write(ns, &fixeddriverpnt, sizeof(fixeddriverpnt));[/CODE] and for the client: [CODE] read(sock2, &fixedparkpnt, sizeof(fixedparkpnt)); read(sock2, &fixeddriverpnt, sizeof(fixeddriverpnt)); [/CODE] sock2 … | |
if u want to invoke the gnuplot with c then your code should be in this pattern. [CODE]FILE*gnuplot; gnuplot= popen("E:\\gp442win32\\gnuplot\\binary\\gnuplot -persist","w"); fprintf(gnuplot,"plot 'output.DAT'\n"); fprintf(gnuplot,"set title 'Po(db) v/s step/(km)'\n"); fprintf(gnuplot,"set xlabel 'step(km)'\n"); fprintf(gnuplot,"set ylabel 'Po(db)'\n"); fflush(gnuplot); close(gnuplot);[/CODE] | |
Hi All, In c programming we get [B]Debug assertion failed application error[/B] when we use malloc() and free() functions so anyone know about this error..? and why we get this error..? Thanks | |
I have numbers represented as chars (eg. '11.27') I want to type cast it to a double but im getting "pointer value used where a floating point value was expected". Any ideas? |
The End.