15,551 Topics

Member Avatar for
Member Avatar for ulcimd1

I am learning about code auditing, and I have a question relating to the argc/argv[] variables. I think that the argc is an integer type, so would enough command line arguments overflow the buffer? I know that it's a stretch, but I am looking for the third vulnerability in our …

Member Avatar for Tom Gunn
0
113
Member Avatar for vladdy191

Hello I'm trying to copy a character pointer into another character pointer. I currently have [CODE]static char *my_kstrdup(const char *buf) { char *ptr, *ret; ret = ptr = kmalloc(strlen(buf)); if(ptr = NULL) panic("kmalloc returned NULL"); for(; *buf != '\0'; ++ptr, ++buf) *ptr = *buf; *ptr = '\0'; return ret; }[/CODE] …

Member Avatar for Dave Sinkula
0
72
Member Avatar for Ineedhelpplz

Why am I getting the wrong output? I have a feeling it has something to do with using type char vs. int....but im not specifically too sure. Please help! [CODE]1. blade71(130)% gcc -o vt visitype.c 2. blade71(131)% vt < vt.in > vt.out 3. blade71(132)% cat vt.out 4. The code 55 …

Member Avatar for Ineedhelpplz
0
192
Member Avatar for DARK_BYTE

I'm writing a program that needs to use only the Unix system calls open, read and write to get and print data!The problem is that the program doesn't allow me to input the marital status of the first student! Am I missing something? Here is the code: [code] #include<stdio.h> #include …

Member Avatar for DARK_BYTE
0
230
Member Avatar for acidik_4

hi Ive been working on a program that finds hidden files copies the contents and then deletes the hidden file so far ive got system("set OLDDIR=%CD%&&@ECHO OFF&&ECHO Finding Hidden Files&&dir /ah&&PAUSE"); printf("Please Choose The Files You Want To repair separated by spaces\n"); scanf("%c",&d1); getchar(); string cmd="echo"+d1; system(cmd.c_str()); but im having …

Member Avatar for MrNoob
0
73
Member Avatar for duggydiggy

[code] #include <stdio.h> #include <conio.h> void *memset(void *dest,int value,int cnt); void *memset(void *dest,int val,int cnt) { void *start=dest; while(cnt--) { *((char *)dest)++=(char)val; } return start; } int main() { char arr[]={1,2,3,4}; memset(arr,0,4); printf("%s",arr); _getch(); return 0; } [/code] error : ++ need lvalue I know how to resolve this,but I …

Member Avatar for MrNoob
0
69
Member Avatar for Comix Zone

Hi, I am new member of this forum, and i find it quite interesting. Here is my problem, i have some work for school that have to finish fast, and of course I google it, and found it here :) But there seem to be little problem, code that I've …

Member Avatar for Comix Zone
0
225
Member Avatar for Dretkal

I am getting an error that says undeclared identifier. It is on the line if (answer[i][j] == ' '){ answer[a][j] = '*'; I have attached a good chunk of the code if you need more please let me know. Thanks. int main(void) { char answer [100][48]; int count; count= GetInput(answer); …

Member Avatar for Dave Sinkula
0
74
Member Avatar for Ineedhelpplz

I receive the following error when I compile my code: [CODE]blade71(154)% gcc -o vt visitype.c Undefined first referenced symbol in file aVal /var/tmp//ccrbSM18.o ld: fatal: Symbol referencing errors. No output written to vt collect2: ld returned 1 exit status blade71(155)% cat visitype.c #include <stdio.h> #define MAX 1000 void aVal(char asciiname[], …

Member Avatar for Ineedhelpplz
0
180
Member Avatar for osei-akoto

Please can somebody explain to me whether sometimes the strrev function fails or not. I was giving an assignment to write an application that can detect whether an entered word from the keyboard is a palindrome or not. After accepting the string and tried to use the function from the …

Member Avatar for yellowSnow
0
629
Member Avatar for chingkoysilog

im not a little bit familiar with c program.....so can u help me to change this program to c program......pls ASAP.. here are the code: import java.awt.*; import java.awt.event.*; import java.net.*; import java.io.*; import javax.swing.*; public class TicTacToeServer extends JFrame { private byte board[]; private boolean xMove; private JTextArea output; …

Member Avatar for yellowSnow
0
200
Member Avatar for bbballin

i have to write a program where i input two positive integers (L and H) which are both less than 21. the program then prints out a box of solid asterisks wit L horizontal asterisks and H vertical asterisks. i dont really know where to start... can someone tell me?

Member Avatar for yellowSnow
0
80
Member Avatar for sethuramang

Hello, I'm trying to implement a program in C to read and display data from a text file, assign certain values to pre-defined variables and continue reading in the data. And example format of the data file is: --------------------------------------------------------------------------------------------- *** General Comments *** .... ***... .... 5 125 3 .6167 …

Member Avatar for dkalita
0
93
Member Avatar for adi.shoukat

[CODE]while(size!=0) { printf("loop start"); printf("File Size in int: %d \n",size); byte_count = recv(sock,recv_data, 1024,0); recv_data[byte_count] = '\0'; printf("hhahaha %d \n",10); printf("char is:%c \n",recv_data[0]); //fputc(recv_data[0], fpW); size=size-1; printf("loop end"); } fclose(fpW); This is a piece of Client side code .. i am sending data from Server Side but when i receive …

Member Avatar for dkalita
0
266
Member Avatar for Gchan

hi i need a help in a code.. Code requirement is:- FInd most occuring element in an array.. Say i have an array {1,2,4,4,4,5,1} answer should be 4..... Code should be in C language......

Member Avatar for mrnutty
0
73
Member Avatar for rpjanaka

Hi all, My program have two threads (parent thread & child thread). I want to set a high priority to my child thread when it is created. So I just follow the example given in the follow ([url]http://cs.pub.ro/~apc/2003/resources/pthreads/uguide/users-12.htm[/url]) ************************************************** [code=c] #define _MULTI_THREADED #include <pthread.h> #include <sched.h> #include <stdio.h> #include "check.h" …

Member Avatar for jakethesnake86
0
2K
Member Avatar for katwalatapan

Hello everyone, While implementing POSIX messaging queue, I am encountered with "Message too long error". I have stated 128 bits for my problem, but it still gives the same error. Please do help me in resolving this memory issue. Regards, Tapan. [code=c] #include <stdio.h> #include <stdlib.h> #include <pthread.h> #include <mqueue.h> …

Member Avatar for gerard4143
0
1K
Member Avatar for nateuni

Out of all the possible problems I though I may have in my program, this was not one of them. My menu code is looping twice before stopping for the fgets to take input.. so my menu options are getting printed twice? I have tried flushing the crap out of …

Member Avatar for nateuni
0
598
Member Avatar for Ineedhelpplz

[CODE]#include<stdio.h> #include <stdlib.h> #define MAXLINE 10000 void reverse(char *str); int main() { int c, i; char j; char S[MAXLINE], *p1; p1=S; for(c=getchar(); c!=EOF; i++) { S[i]=c; } reverse(p1); return 0; } void reverse(char *str) { if(*str) { reverse(str+1); putchar(*str); } } [/CODE] Please help me correct the segmentation fault. [QUOTE]blade71(107)% …

Member Avatar for Ineedhelpplz
0
151
Member Avatar for Ineedhelpplz

Instructions: Trailing blanks and tabs are defined as blanks and tabs that precede a '\n' character or an EOF to terminate a line, without any intervening characters of other kinds. You should copy a getline() function of the kind you see in the text to read in lines from stdin …

Member Avatar for Ineedhelpplz
-1
526
Member Avatar for Darknessssss

A simple used car market Design and implement a used car market program.Store the following information for a car: a. ID (unique, can be used as the key) b. Brand c. Model d. Year of manufacturing e. Driven kms f. Price Valid operations are add/update/delete a car and search. User …

Member Avatar for wineandcars
0
145
Member Avatar for duggydiggy

I have come across a strange behavior.. [CODE] #include <stdio.h> #include <conio.h> int strlen(const char *); int main() { char str[]="rahul"; printf("%d",strlen(str)); _getch(); return 0; } int strlen(const char *str) { const char *eostr=str; while(*eostr++); return eostr - str; } [/CODE] Outputs : In VS9 Length:6 // correct In gcc …

Member Avatar for duggydiggy
0
184
Member Avatar for Caglow

I've got a problem with this piece of iterating code: [CODE] /* Iterate to apparent position */ while (a1 != aT) { /* <-- assume a1 == aT here after the 3rd iteration */ a1 = aT; /* Recalculate position */ Venus_C(JDE - aT); /* Calculate */ ep = sqrt(pow(Venus_x(), …

Member Avatar for Caglow
0
351
Member Avatar for konohastar

hi guys, I am a new student in learning C, I have about a month of experience on it and i am learning now how to use loops. I wanted to write a program using loops in which i ask them to guess a password to a question i ask. …

Member Avatar for konohastar
0
239
Member Avatar for vileoxidation

I am working on a program in C right now that deals with linked lists. Here is the assignment statement: [INDENT]"Write a C program called Assignment4.c, that creates a linked list of Customer data. Each entry in the list is to have the customer’s last name, first name, id (int), …

Member Avatar for vileoxidation
0
283
Member Avatar for van_tomiko

Anyone got anything about reading a sequential number from text file per line and parsing it to an array in C? SequentialNumber.txt 12 3 45 6 7 8 3 5 6 7 7 0 -1 4 5 array1[] = {12, 3, 45, 6, 7, 8}; array2[] = {3, 5, 6, …

Member Avatar for yellowSnow
0
127
Member Avatar for spdr2006

Could you check this C language Code... The Output is not complete... it doesnt print the firstclas name n id? my assignment is Write a complete C program that will meet the following requirement: • Create student detail must contain each student’s name (as a string), id (as integer) and …

Member Avatar for yellowSnow
0
323
Member Avatar for Ineedhelpplz

This is the error I have been receiving when trying to compile my code: [QUOTE]blade71(45)% gcc -o trim trim.c Undefined first referenced symbol in file getline /var/tmp//ccYdyoM3.o ld: fatal: Symbol referencing errors. No output written to a.out collect2: ld returned 1 exit status [/QUOTE] My source is only a rough …

Member Avatar for Ineedhelpplz
0
968
Member Avatar for edwar

is there anyone who knows how to remove numbers and coma's from a text file

Member Avatar for gerard4143
0
102
Member Avatar for Enigmo

Hello. Please, say, how can I obtain a contact's Birthdate? The standart export from Addres Book does not export it. If I'm writing a code,(using that from [URL="http://www.daniweb.com/forums/post996454.html"]http://www.daniweb.com/forums/post996454.html[/URL] ) there is a property PR_BIRTHDATE. How do I convert it to the text string and write anywhere, like Edit3.Text = lpProp->Value.(something …

0
86

The End.