15,551 Topics

Member Avatar for
Member Avatar for modaslam

hello Can anybody tell me how to Write a C program to print "Hello World" with out using ';'

Member Avatar for Narue
0
131
Member Avatar for Nessie

Hello, C newbie here... below is a driver for a pretty simple function which is supposed to read in n chars from input and store in a char array. [CODE=C]#include <stdio.h> #define SIZE 81 void get_str (char * array, int n) ; int main (void) { char instr [SIZE] ; …

Member Avatar for Nessie
0
111
Member Avatar for soosai

hi im a very fresh n new user of this field... wanna know how to simulate different type of possilbilities of combinmation of number from a set of numbers and characters example.. given that to create all comnination that can be formed from the set ABC123 like combination ...? thanks …

Member Avatar for jephthah
0
92
Member Avatar for g_loughnan

Hi all, I'm trying to figure out how I can call the function estimate from the main. It takes as input: [code=c] float data[], int n, int m; [/code] and should output the float *xms and the float array float d[]: [code=c] float *xms, float d[] [/code] I don't know …

Member Avatar for g_loughnan
0
133
Member Avatar for mank

I cant seem to figure out whats wrong with this code, I am trying to generate random floating point number numbers with values from 0 to 1 with positive and negative values here is the code [CODE]#include <stdio.h> #include <stdlib.h> void populate(int generations) { int seed, ttt; seed = 456739853; …

Member Avatar for jephthah
0
132
Member Avatar for kpnprakash

hi, i want to know how to get a text file situated anywhere in my drive and to read it.

Member Avatar for WaltP
0
70
Member Avatar for Sh13

Q. Write a function Stars() whose input are an array of characters(a), the size of the array(n), and a character(ch). This function should replace all occurrences of ch in the array, a, with a star(*), and return the number of times the replacement was made. So far I have the …

Member Avatar for Sh13
0
74
Member Avatar for StithYOSHI

I'm working on a simple library to load data from .3ds files. I was working on it, and everything was working almost perfectly, when I realized that I should have been reading four bytes for each item in facelist[] and I was only reading two (code attached). I simply modified …

Member Avatar for Salem
0
77
Member Avatar for g_loughnan

[code=c] #include <stdio.h> #include <stdlib.h> #include <math.h> void estimate(float data[], int n, int m, float *xms, float d[]) int main(void) { double data[] = { //Loads(~1000) of data vavues between +1 and -1. Ex: -0.15709, -0.25413,... }; float xms[m]; float float d[m]; for (i=0;i<m;i++) { //Function call here to fill …

Member Avatar for g_loughnan
0
94
Member Avatar for sjgriffiths

hello I have the following [code=c] while(fgets(b2b_rates_address,1000,in_fp) != NULL ) { strcpy(rates_details[j].ig1, strtok(b2b_rates_address,",")); printf("rates_details[j].ig7 = %s\n",rates_details[j].ig1 ); strcpy(rates_details[j].ig2,strtok(NULL,",")); printf("rates_details[j].ig7 = %s\n",rates_details[j].ig2 ); strcpy(rates_details[j].ig3,strtok(NULL,",")); printf("rates_details[j].ig7 = %s\n",rates_details[j].ig3 ); j++; } [/code] The issue i have is this:- It works fine up to field ig3, this is due to the fact that …

Member Avatar for Narue
0
148
Member Avatar for cjw3131

im just trying to use the inputted terms in the main function. the error is: [B]hwk6.c:10: error: expected ';', ',' or ')' before '*' token[/B] [code] #include <stdio.h> #include <math.h> int getTerms(void); int term1; int term2; int term3; int term4; int term5; int main(int term1*, int term2*, int term3*, int …

Member Avatar for Ancient Dragon
0
91
Member Avatar for Majestics

I have a string , i want to give it a blink effect ... is there any specific function for it .

Member Avatar for arpit_yadav
0
140
Member Avatar for Spring_1000

Hey, I've been stuck on something all day, when I first looked at it I thought it was going to be relatively easy. I want to be able to let the user return to a menu whenever they press enter without typing anything else. I've looked on google, but I …

Member Avatar for Spring_1000
0
245
Member Avatar for Nemes

Hi, I have somewhat of a mysterious crash on my program. As far as myself and my primitive knowledge are concerned, this litterally does not make any sense at all, but maybe you guys can make some sense out of it. Basically, inside a loop, I modify a float variable …

Member Avatar for Diode
0
2K
Member Avatar for Diode

I'm trying to figure out how to parse options such as -h out of the arguments passed on the command line when the program is called. Here is my code so far. I compiled it with gcc -Wall -o options options.c and got no warnings or errors. Although, when I …

Member Avatar for Diode
0
99
Member Avatar for knight fyre

Why doesn't it work when I enter "NO"? [CODE=c] do{ printf("\n\nDo you wish to continue (yes or no): "); uppercase(fgets(progress, sizeof progress, stdin)); fflush(stdin); ((strcmp(progress,"YES")!= 0 && strcmp(progress,"NO")!= 0)?printf("\nOnly 'yes' or 'no' will be accepted!\n"):printf("\n")); }while(strcmp(progress,"YES")!= 0 && strcmp(progress,"NO")!= 0);[/CODE]

Member Avatar for jephthah
0
125
Member Avatar for mreply

hi, can u tell me y linker gives error when we try to define a variable in a header file and include this in more than one source file? [code] /*test.h*/ int i =0; /*1.c*/ #include "test.h" i++; /*2.c*/ #include "test.h" i++; [/code] whereas the same works fine if i …

Member Avatar for Salem
0
273
Member Avatar for modaslam

Hello Geeks, I am working on a program for date,month calculation. I found this code used to convert to Gregorian format for calculation. It would be great full for me if anybody can explain this ... like 0.75 yy/4 .4*mm what are these constants why m-1, yy-1 etc.. [CODE] long …

Member Avatar for modaslam
0
146
Member Avatar for Diode

I don't know about C, but I read that C++ doesn't have any "standard" library for networking stuff. I was wondering which libraries for C were more popular or higher acclaimed. And who better to ask than the experts themselves? Many thanks in advance diode

Member Avatar for Diode
0
108
Member Avatar for Tom21

I have write a code to read data from a file and i try to put it in a queue but i don not know who to put in th queuue.IS anybody who can give an example??? my code is bellow: [code=c] if((fp=fopen("read.txt","r"))==NULL){ printf("\nERROR OPENNING THE FILE"); exit(1); } while(fgets(line,100,fp)) …

Member Avatar for jonnelgrande
0
71
Member Avatar for Mr.UNOwen

Hello, Before I switched to Ubuntu, I used to have some cool boot screens for windows and now I want to create some for Ubuntu, but I have no clue where to begin. What I do know: - text input and output in C - animation in Java - using …

Member Avatar for Crushyerbones
0
83
Member Avatar for modaslam

I have some question on structure padding Can any one help me! Structure padding is done for alignment(is it right) 1. Why is it to be aligned? [CODE] 2. struct sfoo { int a; char i; } sizeof(struct sfoo) = 8 // 4+1+3(padding) struct sfoo { //int a; char i; …

Member Avatar for modaslam
0
345
Member Avatar for cjw3131

[code=c] #include <stdio.h> #include <math.h> void getTerms(void); int getPattern(int* term1, int* term2, int* term4, int* term5); void patternAdd(int* term1, int* term2, int* term5); void patternMultiply(int* term1, int* term2, int* term5); int term1; int term2; int term3; int term4; int term5; int test1; int test2; int addval; int multval; int main(void) …

Member Avatar for Ancient Dragon
0
88
Member Avatar for Crushyerbones

Basicaly I want to see if a a number (in my example: 12345678910 ) contains another, smaller number (1234). For this I decided to turn a into a string. For some reason my "in" function never worked. But now for some reason if I ever decide to invoke, there's a …

Member Avatar for Crushyerbones
0
121
Member Avatar for bhoot_jb

i have two questions right now in my mind : [B]question - 1 :[/B] please have a look at this code : [CODE]void function (int recd) { printf ("%d", recd); } void main() { int p=10; function(p); }[/CODE] here...when p is passed to function, the thing that actually takes place …

Member Avatar for WaltP
0
101
Member Avatar for jerryseinfeld

Ok... I did 3-4 project with your help. I have got now three 100 grades and I am so happy thank you all :) But now I have a huge problem... My new project is mess....... [COLOR=#000000][/COLOR] [COLOR=#000000]"""You are been asked to prepare the creation of a pseudo-random number generator. …

Member Avatar for yupi
0
428
Member Avatar for jitendersharma
Member Avatar for piyush_chande

Hello!! I am using Keil Compiler C166. I want to know how much ROM, RAM has been utilized by the code. Can someone help me for this?

Member Avatar for Salem
0
62
Member Avatar for hobbsalex

Hi there, I'm becoming increasingly confused trying to implement an array of pointers, that themselves point to nodes in a linked list. Basically my problem is that I need to sort through an existing linked list per element, over all other elements (which works fine) based on a particular criterion, …

Member Avatar for hobbsalex
0
3K
Member Avatar for meinatari

Please forgive me, I know *VERY* little about C... I can hack out enough to do what I need to do for the most part but I'm absolutely lost on a project I need to finish. I am writing a wrapper for common RHEL commands so that our helpdesk technicians …

Member Avatar for meinatari
0
64

The End.