15,551 Topics

Member Avatar for
Member Avatar for holocron

Hello all, Here I intend to reverse a line of text ending in a newline, but only the individual words will be reversed, not every character. For example, "This is just a test." would output ".test a just is This". The code as stands prints a space for every character …

Member Avatar for WaltP
1
691
Member Avatar for furqankhyraj

[CODE] #include<stdio.h> #include<conio.h> void main() { int n,f; f=1; printf("Enter the number:\n"); scanf("%d",&n); while(n>0) { printf("%d",n); f=f*n; n--; } printf("The factorial of the integer is:%d",f); getch(); } [/CODE]

Member Avatar for WaltP
0
147
Member Avatar for hemant_is_here

hi all plz explain me with syntax "how to pass pointer to a function or pointers to a function " . plz tell me if there any big tutorial which can solve my problem providing a deep knowledge about it . and one more probim : what is incorrect int …

Member Avatar for jamma
0
782
Member Avatar for sushilmunot

hi guys.. can cayone pls tell me how to accept images in c as an input and process them further for compression using jpeg algo. pls help me as i'm stuck up in the beginning of the project

Member Avatar for Salem
-4
193
Member Avatar for Zaelis

Ive been working on a Game of Life simulator in C for my programming class. Essentially, it needs to take a single line of input and print out a nice grid of x's and o's (representing live cells and dead cells, respectively). I need to input the grid size, the …

Member Avatar for erantivanisha
0
140
Member Avatar for saracooper

Hello, I am working with variable arguments and I have no problem using them with Integer, Float or char arrays. But when I try to use String arrays, it is a multidimensional array and I am not sure ... I am calling a function with variable arguments, one of which …

Member Avatar for saracooper
0
2K
Member Avatar for Vhalor

Hey guys, been to the forum a couple times but never posted. Thought I'd give it a try. So my problem is basically this. I'm to create a program which reads a line in this form "-6 1 2 3 6" "-10 1 2 5 10" -6 being a perfect …

Member Avatar for Narue
0
120
Member Avatar for flipjoebanana

Is there a way to hide assembly code when my C code references a library function that deals with memory? (Not showing 'asm' code)?

Member Avatar for gerard4143
0
131
Member Avatar for hsp700

What is the keycode of "Escape" while using curses.h???? is it KEY_EXIT?? I hv used this bellow but when i press escape, it prints "^[" instead of stopping the loop! and when i press "g", it does what i want the code to do when "escape" is pressed!!...Help! I am …

Member Avatar for IsharaComix
0
12K
Member Avatar for smbee

I am writing the game of life code. Now this is running for smaller size of matrices, but I need this to run for big matrices. So I need to deallocate the memory somehow. I tried it with the //deallocate part at the end of calculate(). But now its showing …

Member Avatar for Ancient Dragon
0
143
Member Avatar for robinotje

Hello everybody, I was trying to make a telephone directory, when I ran in to several problems with the compiling. When I fixed these, I saw that the programm wasn't working as I want it to work :) Can anyone tell me what I did wrong, and try to help …

Member Avatar for WaltP
0
451
Member Avatar for needhelpe

i already did a program that encrypts letters by skipping 1 or 2. but now i need to make a program that encrypts a word, using substitution. I already try several things but i can't get it work. can anybody help me? for example the normal key is a,b,c,d,e and …

Member Avatar for holocron
-2
103
Member Avatar for sweetnidhi

cprogram i doing mca so i do one program the defination is: do binary addition of 8 bit number

Member Avatar for lamoracke
-1
75
Member Avatar for bobbyross

I am new student in c programming class and I have to do a program that shows "currency Conversion" and then make a flow chart and control sheet.

Member Avatar for WaltP
0
197
Member Avatar for hsp700

Is there any character that takes cursor to previous line? printf("H\n"); will print H and then take cursor to newline(1 step down). output: ............ H _ ............ But is there any control character that will work in the following way: printf("\nH(the character i am finding)"); takes cursor in newline, prints …

Member Avatar for Dave Sinkula
0
80
Member Avatar for Rajesh iPhone

[b]Split from - [url]http://www.daniweb.com/forums/thread33991.html[/url] [/b] Hi, I need a logic to align 10 variables in different order every time a user logs into the application. Thanks in Advance :)

Member Avatar for Salem
-3
32
Member Avatar for onaclov2000

I've been given an assignment in class to take some code and work on improving the optimization, we can either write new code or use old code. For some reason I can't think of anything that would be a good example of code that can use multiple optimization techniques, I.E. …

Member Avatar for onaclov2000
0
89
Member Avatar for sfreema4

I am having issues with outputting a string correctly that is coming from a 4K read buffer. Here is the code I have currently: read_4K.c (cannot be modified) [code=c] int read_4K(char *b) { return read(0, b, 4096); } [/code] reader.c [code=c] static char Buffer[4096]; static int Bend = 0; static …

Member Avatar for tmoorez06
0
204
Member Avatar for gagan gowda

hi, i am doing a project in c(linux).the topic is authenticating and authorizing the client before accessing the file from the server.i already wrote the code for creating a client and server with allowing access to 10 client.for authentication if u cant give some tips or code please do reply.

Member Avatar for gagan gowda
-1
81
Member Avatar for arsenal_fan

Hi, I got this code for computing permutations of a string from the programming interviews exposed book. I am unable to think as to how recursion works in this case. Now, if the input string is "hat", then I have understood the sequence of recursive calls that lead to the …

Member Avatar for Ancient Dragon
0
134
Member Avatar for eablair

[b]Split from - [url]http://www.daniweb.com/forums/thread47395.html[/url] [/b] [QUOTE=rhp405;226272]Ok, here's the solution. When you have a pipe open in parent process, you have to close the pipe before waiting. It has to do with the file descriptor counters of the pipe ends, they have to be zeroes to not cause a child to …

Member Avatar for eablair
0
169
Member Avatar for abhimanipal

Hello People, Does any one have any practice problem sets for C. I am interviewing for a company tomorrow and they ask lots of "Whats the output ?" kind of questions.. Any help would be appreciated

Member Avatar for Salem
0
98
Member Avatar for gangsta1903

[code=c] #include <stdio.h> int main() { char name[50]; printf("enter your name:"); gets(name); puts(name); return 0; } [/code] hello, the above program should first print out "enter your name:", but it does not. it occurs in this way on the console: --------------------------- abc enter your name:abc --------------------------- it prints "enter your …

Member Avatar for gerard4143
0
69
Member Avatar for Kombat

I am trying to be able to read in 1 000 1 1 1 as like 100011. Also when I do printf of the string program crashes. Here is my code [CODE]#include <stdio.h> #include <string.h> #include <ctype.h> #define MAX 32 int main(void){ int i; int c; char a[MAX]; char b[MAX]; …

Member Avatar for Kombat
0
150
Member Avatar for badlucky

so i have my main program which reads in a data file through the command line, and the data file is a list of names, each line consists of "last name first name" (no quotes obviously) all i want to do is print out the list of names as "first …

Member Avatar for badlucky
0
73
Member Avatar for PMACLEAN

Could someone please advise me on how to implement fork() in a parallel processing (multiplying) of a 2d array....I have been at this for far too long.. here is my code [code] for (int i = 0; i < rowCol[0]; i++ ) result[i] = (float*)malloc ( rowCol[1] * sizeof(float) ); …

Member Avatar for abhimanipal
0
178
Member Avatar for cecilia_g1

Hola, Necesito leer un valor de una variable como hexadecimal, y guardarlo en otra, pongo el codigo y quiza con eso quede mas claro. Tengo esto: buffer es un arreglo de caracteres y aux tambien buffer[i] = atoi(aux); Un ejemplo: atoi(aux) me regresa 40 entonces yo quiero que el valor …

Member Avatar for Narue
0
136
Member Avatar for cecilia_g1

Hi all, How can I do assign a Hex value to variable from other variable. I mean I have this: buffer is a char array aux is a chara array buffer[i] = atoi(aux); atoi(aux) return for example 40, then I want to see the value 40 on the buffer[i], but …

Member Avatar for WaltP
0
99
Member Avatar for cecilia_g1

How can I do assign a Hex value to variable from other variable. I mean I have this: buffer is a char array aux is a chara array buffer[i] = atoi(aux); atoi(aux) return for example 40, then I want to see the value 40 on the buffer[i], but is not …

Member Avatar for WaltP
0
71
Member Avatar for icu222much

I am trying to program with semaphores and was told that I should use sem.h. When I compile, I get the error: "sys/sem.h: No such file or directory". How can I fix my problem? [CODE]#include <stdio.h> #include <sys/sem.h> int main() { printf("I am alive \n"); getchar(); return 0; }[/CODE]

Member Avatar for icu222much
0
1K

The End.