15,550 Topics

Member Avatar for
Member Avatar for cufisa

Hello there everyone. I am in need of assistance in writing a code for my program. What I have to do is write a code to generate the following: (1) * ** *** **** ***** (2) ***** **** *** ** * (3) ***** **** *** ** * (4) * ** …

Member Avatar for aamira_s
0
158
Member Avatar for kimprosthom

can anyone tell me how to creating pyramid in C.and tell me the sytax of it.

Member Avatar for aamira_s
-1
185
Member Avatar for addbot101

/*Does the Bubble sort algorithm above sort the array into ascending or descending order?*/ void BubbleSort(int Data[ ],int ArraySize) { char sorted = ‘f’; int pass,a,Temp; pass = 1; while (sorted=='f' && pass<=ArraySize-1) { sorted = 't'; for (a=0;a<ArraySize - pass;a++) { if (Data[a] < Data[a+1]) { Temp = Data[a]; …

Member Avatar for rubberman
0
123
Member Avatar for san man
Member Avatar for rubberman
0
2K
Member Avatar for ak24

Hello... I'm learning win32 api programming, and I can't figure out how the vsprintf (va_list, va_start, va_end) function works in the following code: [CODE]/*----------------------------------------------------- SCRNSIZE.C -- Displays screen size in a message box (c) Charles Petzold, 1998 -----------------------------------------------------*/ #include <windows.h> #include <tchar.h> #include <stdio.h> int CDECL MessageBoxPrintf (TCHAR * szCaption, …

Member Avatar for ak24
0
273
Member Avatar for devesh2222
Member Avatar for darkeclipse8

Okay so I'm having a problem with this. My homework is to take this array of numbers and increment each one by one. Sounded simple at first and then I realized that in the array the address of variables were assigned to an element in the array. My question is..how …

Member Avatar for Ancient Dragon
0
113
Member Avatar for slygoth

the structure and other things have been declared already just need some help with writing this info to the file with random access method. customer info; void customerinfo(customer); [CODE]void customerinfo(customer info) { FILE *ci; if ((ci=fopen("testing.txt","ab"))==NULL) printf("File \"testing.txt\" could not be opened"); else { printf("Customer ID: "); fflush(stdin); scanf("%d",& info.cusid); …

Member Avatar for rubberman
0
171
Member Avatar for Jcastillo2010

Hey, I was wondering how to have Fscanf loop and do multiple calculations for 4 different employee numbers with 4 different hours and 4 different pay rates. [CODE] #include <stdio.h> double pay_calc (double hours_worked, double pay_rate) { double tax,gross_pay,net_pay; gross_pay = hours_worked * pay_rate; if (hours_worked > 40) gross_pay = …

Member Avatar for redmaiev04
0
756
Member Avatar for rockerjhr

How do i know if two linked lists are set equal? if L1 and L2 are linked lists set equal meaning the set of values of the nodes in L1 is the same as the set of values of the nodes in L2 and order does not matter i know …

Member Avatar for L7Sqr
0
869
Member Avatar for Butum

Hello again guys, I've created a bubblesort function to sort a string in chronological order, it is as follows: [CODE]void playerSort(int player, double ppg[]) { int i,j; char a[999][15]; char temp[15]; /* Converting LF into String */ for(i=0;i<player;i++) { sprintf(a[i],"%.2f",ppg[i]); } /* Sorting Array */ for(i=1;i<player;i++) for(j=0;j<player-i;j++) { if(strcmp(a[j+1],a[j])<0) { …

Member Avatar for yashsaxena
0
111
Member Avatar for rockerjhr

if i have an array of ints and an array of lists like : list Bins[10] and i initialize all the lists in the bins array to null except bins[3] and lets say Bins[3] has 1 node that has the number 8 in it how do i get that number …

Member Avatar for griswolf
0
104
Member Avatar for benmar

alo guys,, do you have turbo c installer please send me a link where to download i need it, i want to practice c programming language... thanks

Member Avatar for Adak
0
219
Member Avatar for masih906

Hi everyone , I'm learning C for couple of months and now I have a project in which I have to make the snake game in text enviroment !! So please someone tell me how can I do that and what I need to learn ?? remember it just has …

Member Avatar for masih906
0
89
Member Avatar for dashure

this is my code and i want to do this function to be general, how i do it? [CODE]#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> #include <string.h> void * DoIt (void *arr, int elemSize, int numElems, void (*f) (void *)); void Sqr (void *x); void main( ) { double a[3] = …

Member Avatar for dashure
0
126
Member Avatar for Straocaste

Hello, I need help making my shell in c. The shell needs to ignore spaces, this means that you can put the spaces you want an the command needs to work, I already resolved that problem, the next problem is that if you put ; two commands need to be …

Member Avatar for rubberman
0
174
Member Avatar for menonnik

Please enclose code or link for implementation of monte carlo methods. Thanks in advance

Member Avatar for rubberman
0
100
Member Avatar for jeevsmyd

I was asked to create a circular linked list of names . My doubt is whether I can use two pointers , one to point to the first node in the list(start and other to the last node) or not! Is the use of two pointers against the whole idea …

Member Avatar for Narue
0
76
Member Avatar for coding101

Anyone have an idea how see if a 32 bit integer has an even or odd number of 1 bits using ONLY bitwise operations? ! ~ & ^ | + << >> thnx.

Member Avatar for Narue
0
89
Member Avatar for vineeth vs

pls any one tell me why the loop is not ending?? (program for quick sort)[CODE][/CODE] [CODE]#include<stdio.h> int partition(int a[],int l,int r); void quicksort(int a[],int low,int high); int loc,temp,pivot,a[50],low,high,left,right; int main() { int n,i; printf("\nEnter the no: of elements : " ); scanf("%d",&n); printf("\nEnter the numbers : "); for(i=0;i<n;i++) { printf(" …

Member Avatar for Narue
0
246
Member Avatar for rockerjhr

this is what i have so fa r globals.h [CODE] #ifndef _globals #define _globals #define NEXT(L) ( (L) -> next ) #define DATA(T) ( (T) -> datapointer ) #define LEFT(T) ( (T) -> left ) #define RIGHT(T) ( (T) -> right ) typedef enum { OK, ERROR } status ; …

Member Avatar for abhimanipal
0
184
Member Avatar for nory22

Am trying to make this program in c which draws the following [CODE]\\* * * \\** *** ** \\*** ***** *** \\***************[/CODE] if the user in puts 4.... ((need help)) i only want to use the nested for loop and the if else statements so please need help that's what …

Member Avatar for Narue
0
111
Member Avatar for vineeth vs

is it not enough to declare the struct variables as shown?? getting error that some are undeclared pls help... insertion on a binary search tree....[CODE][/CODE] [CODE]#include<stdio.h> #include<stdlib.h> struct node { int data; struct node *lchild,*rchild; }*ptr,*new; void insert(int item,struct node *root) { ptr=root; while(ptr!=NULL) { if(item>ptr->data) { if(ptr->rchild!=NULL) insert(item,rchild); else …

Member Avatar for Narue
0
243
Member Avatar for manofhouse

Trying to convert from binary to hex but for some reason it keeps bringing up the error instead of the output [CODE] #include<iostream> #include<string> #include<cmath> using namespace std; void BintoHex (int[]); bool CheckBin (int[], bool); void Hexadecimal (int[]); string hexadecimal; void main() { int bin[4]; int binary; bool reentry = …

Member Avatar for Narue
0
230
Member Avatar for shakisparki

void * realloc(void*ptr , size_t size) is the second argument supposed to be the number of bytes to be allocated, e.g 5 * sizeof(int) or just the number of elements needed e.g 5 or 10

Member Avatar for Narue
0
110
Member Avatar for nemoo

Hey People :) I'm trying to build SimpleVRML project but I received 100 errors like this [CODE] error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::locale::facet::_Register(void)" (__imp_?_Register@facet@locale@std@@QAEXXZ) antlr.lib simpleVRML [/CODE] notice that it's required to build it in Visual Studio 2003 but I'm using 2008 please could anyone help …

Member Avatar for thekashyap
0
167
Member Avatar for Ahmed sunny

i am a student of software. i need some help regarding this. am just a beginner so plz help me out....

Member Avatar for Adak
0
2K
Member Avatar for cayman

Hi Folks Im rusty on my pointer passing I would like to pas an array (or pointer thereof) to a function, for use within that function. I cant remember the correct syntax, if somebody could help me out, that'd be FAB heres where I am at [CODE] int main (void) …

Member Avatar for cayman
0
128
Member Avatar for yashsaxena

Hello All Is it possible to check the ip address of a particular web site? If yes what will be the code?

Member Avatar for venomxxl
0
163
Member Avatar for Buffalo101

Hello, I have a function that looks like this: [code=C] CMyMessage(char type, char *name, char namelen, char *text, char textlen){ ... ?! } ... void main() { char name[50]="JOHN"; char text[200]="testing123"; CMyMessage(1, name, strlen(name), text, strlen(text)); } [/code] The ranges are: Type = 0/1; namelen = 0..50; textlen = 0..200 …

Member Avatar for rubberman
0
121

The End.