15,551 Topics
| |
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 … | |
[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] | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
Is there a way to hide assembly code when my C code references a library function that deals with memory? (Not showing 'asm' code)? | |
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 … | |
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 … | |
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 … | |
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 … | |
cprogram i doing mca so i do one program the defination is: do binary addition of 8 bit number | |
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. | |
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 … | |
[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 :) | |
| 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. … |
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 … | |
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. | |
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 … | |
[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 … | |
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 | |
[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 … | |
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]; … | |
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 … | |
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) ); … | |
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 … | |
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 … | |
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 … | |
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] |
The End.