15,552 Topics
| |
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 … | |
hello, Can any one tell me how to print the patter [CODE] * *** * for n =1 ** **** **** ** for n = 2 *** ***** ***** ***** *** for n = 3 [/CODE] the code i am having is [CODE] for(i=0;i<=n;i++) { for(j=1;j<n-i;j++) putchar(' '); for(k=0;k<=i;k++) printf('* … | |
Hi, Recently I have a text file which contain a bunch of numbers :- 1,0,0,1,0................ 1,0,1,1,1................ I would like to read these numbers line by line and stored into an array. However, I get seg fault for this. [code=c] char filename[5000]; char dump; strcpy(filename,argv[2]); while(!feof(tfPtr)) { for (i=0; i<16; i++) … | |
[code=cpp]#include<stdio.h> #include<stdlib.h> #include<sys/socket.h> #include<features.h> #include<linux/if_packet.h> #include<linux/if_ether.h> #include<errno.h> #include<sys/ioctl.h> #include<net/if.h> #include<net/ethernet.h> #define SRC_ETHER_ADDR "aa:aa:aa:aa:aa:aa" #define DST_ETHER_ADDR "bb:bb:bb:bb:bb:bb" int CreateRawSocket(int protocol_to_sniff) { int rawsock; if((rawsock = socket(PF_PACKET, SOCK_RAW, htons(protocol_to_sniff)))== -1) { perror("Error creating raw socket: "); exit(-1); } return rawsock; } int BindRawSocketToInterface(char *device, int rawsock, int protocol) { struct sockaddr_ll sll; … | |
here's what i have so far. I don't understand where exactly to put the (valid = MY_FALSE;) and the (badInput = MY_TRUE;) and the (valid = MY_TRUE;). [I]The directions state that:[/I] [B]Declare a contant for true, use 1 (MY-TRUE) Declare a contant for false, use 0 (MY-FALSE) Declare the integer … | |
| |
hello i have the following char *b2b_data_Out[1]={"0"}; The number "0" can change. I have a loop which goes round, and i have an integer value which i am going to use to change the above "0" into whatever value i need Question - How do i assign my integer value … | |
Hi all there is a Windows API function as [CODE]HANDLE CreateFile( LPCTSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile ); [/CODE] This function contains argument for share mode.. When I provide it 0 value then no other process can open/access the file already opened … | |
write a program that reads the number of student from keyboard. Then it reads each students name, family name and average and keep these values in the memory. Then the program will sort students according to the choice of the user. You must also format the uppercase/lowercase according to the … | |
Dear Friends, i am just a beginner with C and ma learning it since last 2 days. I found it very interesting. But what I want to do now is that i have to make a tool to filter a image with a low pass filter. does any one know … | |
Hello I have the following pointer char **pOutData; This contains an array of strings. How do i printf each element in of pOutData Hope someone can help best regards | |
Hey, I'm relatively new to OpenGL but I have a little experience in C and I was wondering how I would set the pixel coordinates of an OpenGL windows. Its a little hard to explain what I mean but for example if I would like to instead of having (x,y) … | |
I would have the help from any one to do the program for simulating the algorithms of page replacements in operating system concepts in any programming languages.If it is not possible to say ,please give me other assistance such as other web sites or other references for this as soon … | |
please i want help for the coding of page replacement algorithms implemented in c language | |
Thank you for your advancing helping. I do have a problem in how to encode a bank account that has : 1. account number,user name , intial deposit and balance (updatable) 2. that a specific user can see his balance 3. a user can withdraw money 4. a user is … | |
Hello, Is it possible that someone can help me with the following program? There are 500 light bulbs (numbered 1 to 500) arranged in a row. Initially they are all OFF. Starting with bulb 2, all even numbered bulbs are turned ON. Next, starting with bulb 3, and visiting every … | |
could any 1 tell me why this code isnt working right?? two.txt is not wriiten good... this is the code [code=c] #include <stdio.h> #include <conio.h> #include <stdlib.h> #include <string.h> #define LEN 30 #define LENST 6 int *saveid[5]; char *savename[5]; unsigned *savegrd[5]; unsigned *saveavg[5]; int j=0,k=0; int min=0; int skip[6] = … | |
Hi I am kind of stuck on one aspect of a project that I am currently working on. I have a code for a number guessing game in "C" I need the program to ask the player if they want to play again after the game is done and. I … | |
Hi everyone. I have a quick question regarding a 2d dynamic array, and how to print it. Here is the code I have so far: [CODE] #include <stdio.h> #include <stdlib.h> #include <string.h> #define merror() {printf("Memory allocation problem \n");exit(1);} int main() { int i,j,k,z; int size; char buffer[21]; char buf[21]; char** … | |
Hey, I'm new to Socket Programming, and i've only learned C recently so probably what i'm asking will be very obvious, sorry in advance (= ok Here's my code [code=C] /* * File: Inside_Client.c * Author: Ghaith Hachem and Adel Youssef * * Created on March 17, 2008, 6:12 AM … | |
hi all. i need help... 1.how do i copy a line in a text file into a struct. 2. the text file i have is this: 10 SasonSasoniBenSason 100 100 5 Pinokio 70 90 20 JohnRambo 50 87 3 Elvis 3 77 50 JamesBond 17 1 40 BillGates 91 8 … | |
hello everyone how do i sort an array of 6 number with out using any type of sort and then printing the array sorted? i have a source text file with this numbers {10 , 5 , 20 , 3 , 50 , 40}. i copied the text file into … | |
im in new to c, i did this is some program and i used the math library, but i was wondering how is the math library available within the the system? and how can we find the names of the files that correspond to that library? Also, i read something … | |
i need to bind socket address and port for ipv6 programming... i canoot able to bind global ipv6 address by using normal bind command.... help me to bind ipv6 address and port number | |
Hello guys, can anybody explain to me whats a simple batch processing facility ? i googled it but i couldnt understand anything. thanks . | |
All I need to know is how to capitalize all of the characters of a string. What kinds of functions would I use? | |
can anyone help me convert my c program so it works on a linux system or mac? thank you. [CODE] #include<stdio.h> #include<math.h> #include<conio.h> #include<stdlib.h> int main() { int c; int a, b; char d; pov:system("cls"); printf("Enter the first number\n"); a=getch()-48; system("cls"); printf("Enter the function:\n"); d=getch(); system("cls"); printf("Enter the second number\n"); … | |
i'm trying copy a string to another and adding space between the names but it show a warning c4700 and i don't know why??? [code=c] #include <stdio.h> #include <stdlib.h> #include <string.h> char *convert(char *string) { char *p=string; char *tmp; while (*string==' ')string++; while (*string) { *tmp++=*string++; while(*string >= 'a' && … | |
Alright so.... i have logic errors in my game... and idk how to fix them... can i get some help?..... this is a project due for school... tonight midnight actually... and i'm afraid that if i post my code online that... they'll void my program for plagirism x_X'''... so.... ya … | |
Hi guys, Okay so this time I need help with string input. I have the whole program (yet again) but I just need to figure out how to change letters of user input to redisplay them. The code is below and it asks the user to input the product description. … |
The End.