18,491 Topics

Member Avatar for
Member Avatar for jenny666

Hello, im new to stored procedure and never really used C. For a project i have to write stored procedures and execute them in C. I have written my stored procedures in MySql Workbench and I have Visual Basic 2010 express and Visual studio 2008 installed. How do i execute …

Member Avatar for Ancient Dragon
0
188
Member Avatar for anaychowdhary

hi, I am looking for the code for the following program. Consider a set of elements and a given sum. You need to find a subset of elements whose sum equals or is greater[given there are more than one subset, print the one whose sum is closest to the number] …

Member Avatar for anaychowdhary
-2
196
Member Avatar for neilio86

I need to figure out how to get the min/max in this array. I heard that it can be done using the algorithm library. we have yet to learn that. any help would be appreciated. [CODE]#ifndef Lab4_h #define Lab4_h void GetTemperatures (int Temperatures[], int NumTemperatures); double ComputeAverageTemp (int Temperatures[], int …

Member Avatar for pseudorandom21
0
290
Member Avatar for ruku ruku

hi i m learning stage for c language how can i create round circle in c language can u pls do need ful help for me ....................

Member Avatar for Ancient Dragon
0
54
Member Avatar for darkdai

hey everyone, i was wondering if anyone can tell me how to prompt the user the enter the filename to be searched for using FindFirstFile. and if there a way of setting a default path to search in

Member Avatar for Ancient Dragon
0
126
Member Avatar for jeff4L

When I declare my variables, should be it be like [B]int delay = 0[/B] then initialize to [B]int delay = 0[/B] or [B]int delay[/B] then initialize to [B]int delay = 0[/B]? I'm a bit confused about initializing my variables... [CODE]void calc_pipe() { /* Declare local vars */ int i; int …

Member Avatar for jeff4L
0
208
Member Avatar for peponas

Hey! I'm new to the forum and also a new developer. I'm trying to build an numerical solution for an equoation and my parameters are in an ascii file where I already know their position The file is structured like the example: #Parameter 1 parameter value #Parameter 2 parameter value …

Member Avatar for peponas
0
187
Member Avatar for MooCrow

I'm trying to write a program which reads in a string of defined size from the keyboard and displays how many times each letter appears and also displays how many non-alphabetical characters appear. So far, it successfully counts the number of letters. However, I'm really struggling with getting the string …

Member Avatar for Narue
0
174
Member Avatar for tubby123

Guys, can u tell me a good programming practice to stop iteration inside a for loop based on a condition, that is, something equivalent to a break in a while loop suppose i am iterating inside a for loop, looking for the first number divisible by 2, i would do …

Member Avatar for Arbus
0
209
Member Avatar for DNHK

hello everyone umm I'm having trouble in printing a structure in c... is a program to calculate benefits of employees in a company when they are fired.. getting trouble when printing the hired date of an employee here its the code [CODE]#include <stdio.h> #include <conio.h> #include <stdlib.h> void menu(); struct …

Member Avatar for TrustyTony
0
259
Member Avatar for MooCrow

We've started learning about arrays, but our lecture notes are really not helpful at all and we don't have a book. I'm struggling to understand this question and I honestly have no idea what to do or where to start. I've tried to read tutorials and things but I'm just …

Member Avatar for MooCrow
0
823
Member Avatar for Roelof Wobben

Hello Im trying to learn C rfrom the C book. Now I have this exercise : [code] Write a function that returns an integer: the decimal value of a string of digits that it reads using getchar. For example, if it reads 1 followed by 4 followed by 6, it …

Member Avatar for jl.lakhnai
0
239
Member Avatar for ssaleem1992

i'm a beginner with c... and i need a simple c code to read all the files from a folder in a windows platform

Member Avatar for Narue
0
37
Member Avatar for kirtics344

You’ve been given an assorted set of gears. Each gear has a different number of teeth – the notches on a gear that interlock with notches on another gear to transmit speed. You have a couple of belts one coupled to an input and the other for the output. You …

Member Avatar for maqsood8797
1
184
Member Avatar for asilter

let's say we have a unsigned char pointer with allocated memory of 1 million bytes. Could you give a little code sample which shows how to eliminate first 1000 bytes? the little similar situation is like below: unsigned char array: 12,34,67,99,215,250,123,67 i want to make it: 215,250,123,67 I want to …

Member Avatar for IcantC
1
264
Member Avatar for rEhSi_123

Guys need some advice. I am working on a algorithm for multiple string searching using OpenMp. So within my program I am trying to [U]initialise[/U] each elements of an array to a value of a variable. What I mean by is say if I have array intialised as shown below: …

Member Avatar for Narue
0
122
Member Avatar for Roelof Wobben

Hello, I have this problem. [code] Use the function that you just wrote to read a sequence of numbers. Put them into an array declared in main, by repeatedly calling the function. Sort them into ascending numerical order, then print the sorted list. [/code] So I thought this can work …

Member Avatar for WaltP
0
139
Member Avatar for d_panayotov

Hi guys, Is there a difference between these two: struct->variable struct.variable ?

Member Avatar for Member #866461
0
217
Member Avatar for tubby123

guys, we use like a 2-d array very often. But what exactly is the use of a 2-d array ? Now when i look at it, i feel everything can be done using a 1-d array and incrementing the pointer appropriately. Is the only advantage of a 2-d array , …

Member Avatar for Member #866461
0
172
Member Avatar for Ahmed sunny

Write a program that emulates the DOS COPY command. That is, it should copy the contents of a text file (such as any file) to another file. Invoke the program with two CPP command-line arguments—the source file and the destination file—like this: C>ocopy srcfile.cpp destfile.cpp In the program, check that …

Member Avatar for Arbus
0
990
Member Avatar for s11049151

hey, I have to write a program that asks the user for an input amount (in cents) and the highest denominations of change (1c,5c,10c,20c & 50c). With these 2 inputs, the program then finds the distinct ways in which the change for the given amount can be made using the …

Member Avatar for daviddoria
0
284
Member Avatar for batchprogram

I'm doing some homework for a computer systems class and all is well except this one problem that I can't seem to find a solution to due to the limitations. The problem requires me to write a function that performs addition on 32-bit signed integers but saturates the result to …

Member Avatar for rubberman
0
2K
Member Avatar for yongj

So one of my assignments is to code a MAKEFILE program. Though we discussed this over in class I'm not sure exactly sure how it works. Here's one of the examples we went over: [CODE] ----------------------------------------------------------------------------- # # DELDIR makefile # Old-style MAKEFILE format. Microsoft MAKE V1.x # Similar to …

Member Avatar for zaraki
0
185
Member Avatar for corneliousfazal

Dear Friends i went a little application for data encryption in c using hill cipher.

0
46
Member Avatar for damusalui

i want to develop railway reservation system in c in file system. Please help me to build the database..... my mail id is [snipped]

Member Avatar for sabananthan
-4
47
Member Avatar for Drakarus

I am trying to figure out how to automatically close a simple windows application in C. I know how to create the window. But I have no idea how to get it to automatically close when it has opened without user input/interaction. Basically when it is called upon, I want …

Member Avatar for chrjs
0
176
Member Avatar for shadowscape

Hello Everyone. i have created a XOR Encryption libary in c...well tried with some help. But there is something wrong with my coding as when i try and decrypt a file, it doesnt always decrypt as plain text as some charfacters seem malformed. Please could you help me fix this …

Member Avatar for rubberman
0
218
Member Avatar for vivosmith

Hello I have been using c for dummies along with bloodshed software for a day or so and I tried putting this snippet of code in from the book and I got a syntax error:[CODE]#include <stdio.h> int main() { char name[20]; char color[20]; printf(“What is your name?”); scanf(“%s”,name); printf(“What is …

Member Avatar for Narue
0
353
Member Avatar for jimmymack

So I have a book on C but have Dev-C++ IDE and was wondering if I could learn C from that book whilst using the Dev-C++ IDE? Many thanks in advance!!

Member Avatar for TrustyTony
0
558
Member Avatar for Olifant
Member Avatar for Moschops
0
124
Member Avatar for prvnkmr194

Get_Number function is a function to get input from keyboard, this function restrict the user to pass wrong input........... How to use -> For example we need to take input in any integer variable n call Get_Number() like this [CODE] n=Get_Number(); [/CODE] With Full Back Space support Please comments on …

Member Avatar for TrustyTony
-1
304
Member Avatar for shootersix66

Hello. I am making a program in c from the linux nano complier. I made and tested the program in Dev C++ and it works perfect. When I put it in nano, it complies, but when I run it, it gives a segmentation fault. Please tell me how to fix …

Member Avatar for rubberman
0
140
Member Avatar for IwalkAlone

Q.Create an equivalent of four function calculator. The program should request the user to enter two numbers and an operator. It should carry out specified arithmetic operation on the two numbers( using switch case).After displaying the result, the program should ask the user if he/she wants to do another calculation.If …

Member Avatar for lokeshg
0
2K
Member Avatar for wdearth

I have a program assignment where one part requires a user-defined function where you enter a string with a minimum length of 2 characters and a maximum length of 20 characters. How would I get it to find the length (I believe should be stored into index) of the entered …

Member Avatar for TrustyTony
0
200
Member Avatar for n1csaf3

I am having trouble correctly allocating memory for a parent function that will remain upon the child functions exit. the call to the child function is [code=c]HTTP_packToGen((char*)http_headerContent.HTTP ..[/code] the HTTP variable within http_headerContent is a char pointer that isn't allocated until the child function is called, http_headerContent is a static …

Member Avatar for n1csaf3
0
351
Member Avatar for khubaib007

i want a code of games in C the name of game is Runner man in C Graphic coding

Member Avatar for Member #808376
0
70
Member Avatar for tubby123

I can write char a[] = "hello world"; , but i can not write char a[]; a = "hello world"; why is that ??

Member Avatar for tubby123
0
130
Member Avatar for yashsaxena

Hello All I have some confusion in Declaration and defination of variables. Declaration means ===> where the variables are declared and no memory is allocated. Defination means ===> where the variable is declared and defination is allocated. For eg. if we write (1) int a; printf("%d",a); then it will print …

Member Avatar for nezachem
0
156
Member Avatar for tubby123

Why do we have to initialize a pointer to a string when it is declared globally ? I mean , [B]This doesnt work[/B] [code=c] #include<stdio.h> #include<conio.h> char *str; int main(void) { gets(str); printf("%s",str); } [/code] [B]But this works[/B] [code=c] char *str="1"; int main(void) { gets(str); printf("%s",str); } [/code] Even upon …

Member Avatar for rubberman
0
161
Member Avatar for shanki himanshu

suppose i have 3 functions: a() b() and c() both a() and b() can called c(). if function c() is called how do i know who is the caller??

Member Avatar for rubberman
0
248
Member Avatar for Efficience

Hello Everyone , I have written a simple piece of code for reading an Image file(.png) in c but this code doesn't seem to work properly.Can anyone help me solve this problem of reading an image file in C ? Code I have written is :- [CODE] FILE *file; char …

Member Avatar for Efficience
0
2K
Member Avatar for neverine

Hallo, Can somebody help me how to find combination between code´s. i have 30+ codes like this 7zv7pj. xjdcsa, efzlfl, xkaadt etd but i dont know any program or something what can i help me get more combination or understand how codes work. Ty for help

Member Avatar for neverine
0
144
Member Avatar for cse.avinash

[B][U]input:--[/U][/B] 3 hi hello my name is abc this is a test [B][U]output:--[/U][/B] hi hello my name is abc this is a test here is the code:-- [CODE]#include<stdio.h> main() { int n,i; char b[100],*c; scanf("%d",&n); for(i=0;i<n;i++) { gets(b); c=b; while(*c !='\0') { putchar(*c); c++; } printf("\n"); } return 0; } …

Member Avatar for Narue
0
126
Member Avatar for tubby123

Hello people, I am using Turbo-C Can anyone give me a sample program using the bool array I tried compiling the following code snippet. But it doesnt work. [code] #include<stdio.h> #include<conio.h> int main() { bool a[10]={true}; clrscr(); printf("\nHello World"); getch(); } [/code] It gives the error [B]Undefined Symbol bool[/B]. But …

Member Avatar for Narue
0
138
Member Avatar for verdascofernan

Thanks for your post, can anyone post some books describing some valuable function list of C language which are more close to hardware

Member Avatar for octopusgrabbus
0
124
Member Avatar for mphst

3) Write a program that reads a 21 by 21 array of characters from a text file. It represents a maze. • Each position can contain either an X or a blank. The borders of the maze are covered by ‘X’ except start and exit points. • Read text file …

Member Avatar for TrustyTony
0
996
Member Avatar for darkdai
Member Avatar for abhimanipal
0
100
Member Avatar for tubby123

what does int main() return and to what does it return That is, in the code snippet, [code] int main() { int a=0,b=5,c; clrscr(); c=a+b; return c; printf("%d",c); getch(); } [/code] 1)What is the expected output ? 2)I tried compiling this and i dont get anything on the screen 3)In …

Member Avatar for Ancient Dragon
0
169
Member Avatar for RenanLazarotto

Hey guys! I'm going to start learning C/C++ (again), and I want to start with a very simple program. It should ask to the user a number and, if it is right, run a program. Its been a long time that I don't even touch anything from C, but I …

Member Avatar for Ancient Dragon
0
132
Member Avatar for darkdai

hi all, i have this code which is supposed to display the elements of a char array but the problem is that its displaying funny symbols not the elements. does anyone know why? [CODE]char *list[]={"a","m","t"}; for(i=1; i<=3; i++) { list[i]=(char *)malloc(4*sizeof(char)); } printf("The elements are: "); for(i=1; i<=3; i++) { …

Member Avatar for nezachem
0
116

The End.