15,552 Topics
| |
Hi, # Problem and Background # I'm trying to compile a program that uses some legacy c code generated using the f2c translator (*version of May 1991 13:06:06*). *decide.c* is the source that contains the translated fortran to c code and *f2c.c* is the header file. Durring compilation I get … | |
Hi, Can i ask some help what is the best editor to use in learning C language.... By the way which is which language, should or i must to learn C or C++ ?. Thank you in advance. | |
I want to make a simulation of logic circuits using basic logic gates in C.User will determine the types of inputs, and the gates.I want to design the circuit as a result.And simulation that produces output according to input values.But I can't do connections between gates.Can you give me advice … | |
how the compiler searchs for a file when we write fopen("filename","r"); please draw the flowchart of the whole process | |
Hi, Can anyone suggest me how to set/create Alpha channal like OxaaRRGGBB for 32Bit BMP image?? I used photoshop, Pixelformer to create 32Bit BMP image with Alpha channel but when i open that image in hex editor nothing is set for Alpha channel. | |
#include<stdio.h> #include<conio.h> #include<string.h> struct person { char name[10]; int rno; }; typedef struct person NAME; NAME stud[10], temp[10]; void main() { int no,i; void sort(int N); clrscr(); fflush(stdin); printf("Enter the number of students in the list\n"); scanf("%d",&no); for(i = 0; i < no; i++) { printf("\nEnter the name of person … | |
I'm C newbie and i'm having a tough time with my first assignment :sad: The assignment is on creating a Number Puzzle.....apparently it's the newest craze in Toronto and my prof is a big fan....unfortunately I'm trying to read in a file which looks like this: 9,8, ,5,,4,, 7,3,1, ,5 … | |
#include<conio.h> #include<stdio.h> #include<ctype.h> #include<string.h> int precedence(char c) { switch(c) { case '*': case '/': return(2); case '+': case '-': return(0); } } char *to_postfix(char *infix) { char stack[30],postfix[30]; int i=0,j=0,top=-1; while(infix[i]!=NULL) { if(isalpha(infix[i])||isdigit(infix[i])) { postfix[j++]=infix[i++]; } else if(infix[i]=='(') { stack[++top]=infix[i++]; } else if(infix[i]==')') { while(stack[top]!='(') { postfix[j++]=stack[top--]; } top--; i++; … | |
why can't we take an array :- a[10000000]?? what is the alternative? | |
Hi all, I would like to make program reading 300 lines form a file with 24 columns. the 24th column has an integer from 1 to 24, while the others columns are strings. I want to summarize in seperate files this (last) column For example, assdsd, sdsds, asdasda, asda ,asdad, … | |
Hello all, I am trying to parse a text file that has the following format: 3 1:3,60,3 2:6,70,1 3:3,50,3 I am supposed to take the first line "3", and allocate memory for the 3 lines after it. Then I want to skip the first line, and start parsing and tokenizing … | |
Hello I am new to C and was wondering if someone could just please explain to me what this function does? Thats all I just need help understanding it. I'm new to C so some one the syntax is tough for me to understand and Im not sure what the … | |
Hi, I am currently learning how to program, and have a code below: int voltage; printf("Voltage\t\tSoC\tDescription\n"); printf("-------\t\t---\t-----------\n"); for (voltage = voltage_min; voltage <= voltage_max; voltage = voltage + step_size_variable){ printf("%d\t\t%0.3d%%\n", voltage, ((voltage - 3000)/1200)*100); } When I run it, the program outputs only 0.00%s, and is not calculating the voltage … | |
I have to develop a simple parser, to read "block" of text for example: /TEST {. text .} /TEST_DATA {. infs .} and, I need to read informations of inside of label.... and... the file with have this informations... have a lot of labels, with the same perfil for example: … | |
Hi, The below is my situation, **Input String :** abc 123$ abc 123$ abc123$abcabcabc 123$ From the above string i want to store the starting index of "123$" code and the "123$" string. When i debugged and found, for first iteration(codecount=0) i'm able to store both index and string but … | |
can i add two numbers without using arthemetic operators. can any one do it. | |
Hi, can we write a function in c, tht can accept any type of array, may tht be int, float, char, struct or of any any kind, as an argument and perform some task of tht like sorting etc. Thank you | |
I am writting a driver for a GPS unit in linux. I can set on the GPS unit what data it should send out it's ethernet port. The data is arranged in structs of different sizes depending on what it is. For example one packet could be for the GPS … | |
Please help me: Following is my program: [CODE]main() { char str[] = "This is //20"; char c[10], *k; int num=0; sscanf(str, "%s%[^//]*//%d",c, &num); printf("%s \n %d \n", c, num); }[/CODE] My intention is to get the first string and last number. I want to ignore the remaining text. There is … | |
#include<stdio.h> #include<conio.h> struct adj_node { char nam; struct adj_node *adj_next; }; struct node { char name; struct adj_node *down; struct node *next; }; struct node * gins(struct node *); struct node * lins(struct node *); main() { int n,i,j; char c,r; struct node *g,*t; g=malloc(sizeof(struct node)); g->next=NULL; g=gins(g); g=lins(g); getch(); … | |
int main(void) { char faceValue[2]; char suitValue[2]; //User enters the value of their hole cards. setCardFaceValue(faceValue); setCardSuitValue(suitValue); for(int i=0;i<2;i++) printf("Element %i: %c %c\n",i,faceValue[i],suitValue[i]); return 0; } void setCardFaceValue(char* face) { char card[2][20] = {"left card:","right card:"}; for(int i=0;i<2;i++) { printf("Enter face value for "); for(int x=0;x<19;x++) { printf("%c",card[i][x]); if(card[i][x] == … | |
hi im studing on i have this work and its giving me this error: main.c||In function 'get_jogos':| main.c|75|warning: implicit declaration of function 'get_endereco'| main.c|75|warning: assignment makes pointer from integer without a cast| main.c|76|warning: assignment makes pointer from integer without a cast| main.c|122|error: conflicting types for 'get_endereco'| main.c|75|note: previous implicit declaration … | |
need help in this work .... goal This work is to develop a system capable of managing bank accounts. description The banking system consists of a set of two banks where each bank has a manager, responsible for the accounts of that bank. Also part of the banking customers (maximum … | |
I have a data set in .txt format and want to do some arithmetic operation on the data set using C code. How to do the job? I want to make the text data into a 2D-array. The data set is like this: 1st col - year, 2nd col-January rainfall, … | |
Hi, I have a doubt. Suppose we define a pointer or an array of pointers, and pass it to a function, as in like :- char *p; func(p); /*or this way*/ char *p[10]; /*and then pass this array somewhere to a fucntion*/ func(p); Here, in the call to the function, … | |
Hello frnds. I want to knw tht how can we send an array by value in c. | |
i am unable to understand the code. can anyone please explain. printf("%d",i & 1) wat is the &1?? int i; for(i=0;i<10;++i) printf("%d",i &1); | |
Please help me in the matter of invoking the command_line arguments and using them in the arguments in the main program.i have done it as follows...now i dont know how to pass arguments using c++ and how to access them in the main program.Please help as soon as possible #include<stdio.h> … | |
i am trying to write a C program to do the following: i have a file which has x, y coordinates given as two columns. now the program has to take the first x,y pair i.e. from the first line and check a database of roughly 10,000 data files which … |
The End.