15,550 Topics

Member Avatar for
Member Avatar for summer_21

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 …

Member Avatar for dheaven
0
774
Member Avatar for firdousahmad

how the compiler searchs for a file when we write fopen("filename","r"); please draw the flowchart of the whole process

Member Avatar for deceptikon
0
117
Member Avatar for Perry31

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.

Member Avatar for Schol-R-LEA
0
165
Member Avatar for firdousahmad

#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 …

Member Avatar for abrarsyed
0
799
Member Avatar for dile

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 …

Member Avatar for Lucaci Andrew
0
10K
Member Avatar for abrarsyed

#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++; …

Member Avatar for abrarsyed
0
547
Member Avatar for pooh1234qwerty
Member Avatar for pooh1234qwerty
0
186
Member Avatar for bufospro

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, …

Member Avatar for TrustyTony
0
176
Member Avatar for c_parse

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 …

Member Avatar for Schol-R-LEA
0
203
Member Avatar for wschamps42

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 …

Member Avatar for TrustyTony
0
128
Member Avatar for carrot_123

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 …

Member Avatar for TrustyTony
0
3K
Member Avatar for Bencz

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: …

Member Avatar for Schol-R-LEA
0
194
Member Avatar for jnawrocki
Member Avatar for Perry31

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 …

Member Avatar for Perry31
0
97
Member Avatar for vvidyadhara

can i add two numbers without using arthemetic operators. can any one do it.

Member Avatar for karthi.k.s
0
367
Member Avatar for abrarsyed

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

Member Avatar for KenJackson
0
128
Member Avatar for spetro3387

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 …

Member Avatar for L7Sqr
0
91
Member Avatar for kandarpa

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 …

Member Avatar for deceptikon
0
260
Member Avatar for optimus_prime_1

#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(); …

Member Avatar for deceptikon
0
740
Member Avatar for CharlieBrook

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] == …

Member Avatar for Ancient Dragon
0
235
Member Avatar for danielgek

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 …

Member Avatar for danielgek
0
245
Member Avatar for shiushiu

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 …

Member Avatar for Schol-R-LEA
0
145
Member Avatar for srg85

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, …

Member Avatar for mridul.ahuja
0
2K
Member Avatar for nee_88

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, …

Member Avatar for deceptikon
0
117
Member Avatar for abrarsyed
Member Avatar for Trentacle
0
220
Member Avatar for shibu2all

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);

Member Avatar for shibu2all
0
113
Member Avatar for Rouf mir

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> …

Member Avatar for WaltP
0
102
Member Avatar for softnewdevel1

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 …

Member Avatar for Sokurenko
0
120
Member Avatar for lotusdream

Hi everyone,I'm tryind to do something about sound on linux.I basically record some sound and try to encyrpt it using algorithm.However,I encountered some sort of pointer problem.Both RSA algorithm and recording&listenin sound works properly. Here is my code: /* * rsa.c * * Created on: 24 May 2012 * Author: …

Member Avatar for Schol-R-LEA
0
380
Member Avatar for campuzcrazyness

hi eveRyone, I just want to have your tips for my code.. [CODE] #include <stdio.h> main() { hexa = 16; printf("enter decimal number: "); scanf("%d",&deci); for (ctr = 1; ctr<=deci; ctr++) quotient = deci / hexa; printf("Equivalent in Hexadecimal is %d",quotient); getche(); }[/CODE] I want to print out the numbers …

Member Avatar for bmsangati
-1
989

The End.