15,551 Topics
| |
I need to write a program, that lists keystrings for each command for a given set of commands. Input The first line contains the number n of commands for the console application. Each of the following n lines contains one command of the client. Each command is a nonempty string … | |
hey guys, i am trying to build a chat server.....but whn the server is sending login ack the server starts receiving out of order packets.....login ack is send when a username and password matches... format for username and password is username pasword: plz help me short out the prob. thnks … | |
I have a 2d array of size 4X4 that is [CODE] int arr[4][4]; [/CODE] i want to initialize this from 1-15 but in random manner not sequential example 7 8 9 5 1 2 12 14 3 6 10 13 11 4 15 0 I try [CODE]random()[/CODE] function but iam … | |
I find the OpenGL Co-ordinate system really hard to use. I would much rather have things like glVertex2f(-100,-100) put a vertex back 100 pixels in the X and Y direction from the origin, instead of it being totally off the screen. Is there any way that I can do this? … | |
[CODE]#include <stdio.h> float pounds = 0, inches = 0, BMI = 0; float kg = 0, meters = 0; char input[100], choice; int main() { start: do { printf("\n\nThis program is used to calculate the BMI of a person.\n\n\n"); printf("What kind of BMI do you want to calculate?\n"); printf("(Imperial(i/I) or … | |
Hey all. I don't want to be one of those that sounds like HW but they didn't say it was so I'll be honest, this is HW but I feel like I've done enough that it's reasonable to ask for a little help here. This is a snippet from a … | |
Hi, I am having following code, [CODE] char str[] = "FULL MOON" printf("%c",*str); printf(" for %s",str); [/CODE] This gives output as [B]F for FULL MOON[/B] What exactly is happening inside the str,*str,str[] ? I am lost in the behavior of char array and char pointers. Kindly Help.:( | |
Hello all, I am new to C programming and I am currently working an encoder program that encodes text unintelligibly. I need help writing my recursive function to provide the desired output results. A sample is below. Can anybody help me out or point me in the right direction or … | |
i want to write a code which determines whether a file is executable or relocatable.....i have try this code but its now working ... #include<stdio.h> #include<elf.h> int main() { int fd; elf32_ehdr myhdr; fd=open("abc.c"); if (myhdr.e_type==ET_RELl) { printf(:relocatable"); if (myhdr.e_type==ET_EXEC) printf(executable"); else printf(:other type"); return(0); } | |
[ICODE]Hi, I am following a C course on a book, that's good. Now I am studying the functions, the different type of variables, such as static, local and global variables. There is in the chapter an example of how these types of variables behave when they are on a program, … | |
i have to impplement a dynamic stack to create a program but when i try to compile my stack.c file(with gcc) I get a bunch of errors here are my files GLOBALS.h [CODE] #ifndef _globals #define _globals #define DATA( L ) ( ( L ) -> datapointer ) #define NEXT( … | |
[code] # include <stdio.h> # include <conio.h> # include <time.h> # include <stdlib.h> # include <string.h> # include <ctype.h> int start; int last; # define SIZE 10 int largest (int num[],int msize); int smallest(int num[],int asize); int main() { int num[10]={0}; int i; int min; int max; int pick; int … | |
hi i want to generate non repeated random numbers many times. for that i m using the following code. [code]#include "sys/types.h" #include "stdio.h" #define MAX 200 #define N 20 main() { int array[N],r; int n = 0; int count_check,count_gen ,i,j; for(j=0;j<10;j++,printf("\n")) { srand(j); for (count_gen=0;count_gen<=MAX;count_gen++) { r = rand()%N; for … | |
I am having trouble with the "for loop" of a 32 bit Adder program. I am suppose to take 2 arrays of 32 bits and sum them together. The 2 errors I get are on line 37 and 38 called "called object is not in function". I don't know how … | |
| |
The question is as follows: Write a program to read in a word that is up to 10 characters long. See if any 3 consecutive characters in the word are found somewhere else within the word. If they are, echo those characters to the screen. For example, if the word … | |
I'm currently trying to create a small program that gets the user to enter 5 values, which are then saved in an array, and then the program calculates the average and displays it. Here is what I have so far, it works as far as getting the user to enter … | |
I understand the concept of bubble sort and have no trouble implementing it, but I can't grasp the concept of doing it for 2D array. I've googled for some resources but I was unable to understand those codes. So let's say I have a 2D char array with words (maximum … | |
Why does fopen_s have the paramater [icode]FILE **_File[/icode] rather then the [icode]FILE *_File[/icode] that fopen has? And what is the difference between those two functions? | |
I have been trying to communicate between my client and server program. I have checked and rechecked the man pages and it seems my syntax is correct. I'm trying to send packets from my client to my server and the server prints out the host name. My server seemed to … | |
Hi, another question from someone who is interested in learning more about C/C++. My question is that everyone says C/C++ is more powerful than many other languges e.g Visual basic but why is it more powerful. Is it because of the pointers ? As far as my knowledge goes they … | |
i want to create a virtualization software (like vmware ) which can run single operating system virtually i was searching for this from past few days but not able to know much about coding part So plzzz help me out in this i have to submit it as my project … | |
[CODE]#include<stdio.h> #define ARSIZE 1000000 int main() { int i=0,j=0,c=0,k,n; int prep[ARSIZE]; for(i=0;i<1000000;i++) { j++; for(k=2;k<j;k++) { if(j%k==0) c++; } if(c==2) prep[i]=j; c=0; } printf("Enter N : "); scanf("%d\n",&n); printf("%d",prep[n-1]); getch(); return 0; } [/CODE] why is this code giving segmentation fault?? | |
i was told objects can be created in C just like c++. Does anyone happen to have any examples of how this is done or any recommended resources on this :) thx | |
I'm studying AES ,Can u give me the C code for it...I googled but the code there shows lot of error....pls its urgent | |
This code is part of this program I'm doing. I've edited it so it would get shorter. [code] #include<stdio.h> #include<string.h> main() { char zero[5][6] = {"|||||", "| |", "| |", "| |" , "|||||"}; char secOnes[5][6]; strcpy(secOnes,zero); y=10; for(i=0;i<5;i++){ gotoxy(20,y++); printf("%s", secOnes[i]); } getch(); } [/code] When I try to … | |
I'm trying to my friend with an assignment to turn a number from Fahrenheit to Celsius and Kalvin. All that works fine and good. The problem is that his professor wants him to "The main() function ought to use a loop to allow the user to enter a temperature repeatedly, … | |
Title kinda says it, I was wondering if anyone has heard of this what im about to ask. If i program code on ubuntu 10.04 using netbeans, and code in C. can I somehow save the file from netbeans, and transfer/make a conversion for the netbeans file to be able … | |
[QUOTE=letmec;107703]I'm working on TSR through C. i have writen dogens of them for dos, :rolleyes: but it works for dos only, can you tell me who to write TSR's for windows. Thankyou....[/QUOTE] I want to post the same question also. All I understand is: Windows (say Windows 98) runs under … |
The End.