15,551 Topics
| |
I can not remember how to do this for anything. I need to make a pyramid look like this using a while loop * ** *** **** ***** ****** ******* ******** ********* ********** I can do it using a for loop, but when I do a while all I get … | |
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) * ** … | |
can anyone tell me how to creating pyramid in C.and tell me the sytax of it. | |
/*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]; … | |
can any one help me to how to create avl tree of strings in c | |
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, … | |
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 … | |
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); … | |
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 = … | |
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 … | |
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) { … | |
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 … | |
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 | |
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 … | |
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] = … | |
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 … | |
Please enclose code or link for implementation of monte carlo methods. Thanks in advance | |
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 … | |
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. | |
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(" … | |
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 ; … | |
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 … | |
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 … | |
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 = … | |
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 | |
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 … | |
i am a student of software. i need some help regarding this. am just a beginner so plz help me out.... | |
| 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) … |
Hello All Is it possible to check the ip address of a particular web site? If yes what will be the code? |
The End.