15,551 Topics

Member Avatar for
Member Avatar for aman rathi

hello i am a student of sgrrits dehradun doing bca now a days my pointers chapter is going on its difficult to understand but mostly i did it but i want to know that how it is use ful for us in the c. i only find its 1 benefit …

Member Avatar for jbennet
2
114
Member Avatar for GagandeepKaur

Hi, im trying to calculATE DFT through this code, i dnt know what's wrong please enlighten. Thanks [CODE]#include<conio.h> #include <math.h> #include <complex.h> main() { int m,n,r,N,j; float l,o; float complex x[1000]; float real, imag; { for (m=1;m<=10;m++) { for (n=1;n<=10;n++) { for (j=1; j<=10;j++) N=1000; r=1/N; l=sin(3*j); printf("the value of …

Member Avatar for GagandeepKaur
0
200
Member Avatar for leeba

I am trying to write a program that reads a string and shortens it if the letters are in a row. For instance abcdghigjhkhdf becomes a-dg-igkhkhdf. I want that it erases the ;etters it erases but it is not working. HEre is my code: [code] #include <stdio.h> #define MAXSTRING 100 …

Member Avatar for kommuru
2
64
Member Avatar for danibootstrap

Hi, Is there a way to write code or do functions exist for keypress down and keypress up of the keyboard.There are functions for mouseleft button down and mouse left button up.Is it possible with keyboard keys in windows?Like "Alt"+"F" etc... Any sample code or resource would greatly help.Thanks in …

Member Avatar for Ancient Dragon
0
101
Member Avatar for redroze

hello guys, I get this error MSG and I can't understand what is the problem with my code. my program consist a menu with 5 options: 1. The program remove double digit from a given number. 2. The program rotate the first number to the right according to the second …

Member Avatar for kommuru
0
72
Member Avatar for timaquerra
Member Avatar for hosh

Hi i'm trying to compile this code, but getting warning. need some help to understand what I'm doing wrong. void printGraph(FILE *out, GraphRef G){ out = fopen (out, "w"); if( out==NULL ){ printf("Unable to open file %s for writing\n", out); exit(1); } } warning: passing arg 1 of `fopen' from …

Member Avatar for Aia
0
82
Member Avatar for danibootstrap

Hi , Is there a way that I can draw lines or circles etcc..(graphics) onto windows screen? Please let me know.Sample code would greatly help.

Member Avatar for Ancient Dragon
0
323
Member Avatar for eswar.aspire

hi, Can any one help me about clock problem..i need to calculate the exact execution time of algorithm using the processor clock speed not the wall clock time..i am getting zero by using the clock_t function in time.h.also how can i calculate the exact processor speed execution of program..reply me …

Member Avatar for AuSsIeStOnE
1
101
Member Avatar for AuSsIeStOnE

[B]fseek()[/B] and [B]ftell()[/B] work only for files < 2,147,483,647 bytes [B]fseeko64()[/B] and [B]ftello64()[/B] from [B]<stdio.h>[/B] can deal with files up to 18,446,744,073,709,552,000 bytes the printf format for unsigned long long val is [B]%I64d[/B] eg. Obtaining the file dimension (this code was tested with [B]GNU GCC compiler[/B] (MinGW/Cygwin) from code::blocks)

2
484
Member Avatar for vampgirl13

Hi, I was wondering if anyone can help me translate this into java. Thanks [CODE]#include "Element.h" #include <stdlib.h> element * Element(int s1, int w1, double c1, int x1, int k1) { element * retval = malloc(sizeof(element)); retval->s = s1; retval->w = w1; retval->c = (float) s1 / (float) w1; retval->x …

Member Avatar for vampgirl13
2
109
Member Avatar for ybean4

stdio.h only includes function declarations. Where does the compiler look for the function bodies?

Member Avatar for kommuru
0
59
Member Avatar for voxis

What is the method to remove dupplicate items from an character array?? A Sample Program is Here which take two arrays merge them and sort them please include some lines that should remove duplicates from an resulted array?? [code] #include <stdio.h> // A simple bubble sort void sort(char data[], int …

Member Avatar for kommuru
0
791
Member Avatar for speedy94519

My code: [code] printf("\n"); printf("\tSlalom Race, Version 1.0\t\t\n\n"); printf("1. Play\n"); printf("2. Instructions\n"); printf("3. Quit\n\n"); printf("Your choice: "); scanf("%d", &choice); } /* Initializes loop to begin game */ while (choice != 3) { /* Begins execution of game and Selects instructions if needed */ while (choice == 1) { printf("You are …

Member Avatar for kommuru
0
81
Member Avatar for neithan

Hi, i'm facing a weird behavior in this code that i just wrote. It was supposed to read a string from stdin and just write it out. I've debugged it and for me it reads perfectly, but in the while (line 38), *p just seems to be taking weird chars …

Member Avatar for gerard4143
0
150
Member Avatar for danibootstrap

Hi, I want to write code for opening an external file or program from the C program.Could anyone tell me how to do this? Say if I want to open calculator.exe I mention the path in the program and it should open it or say if I want to open …

Member Avatar for danibootstrap
0
276
Member Avatar for Wtyy

How to print this pattern use "for" ??? [IMG]http://ser1.share.ysk.cc/upload/photo/20091112/754158.JPG[/IMG] :?::?::?:

Member Avatar for Wtyy
0
88
Member Avatar for siggivara

I've written a method that takes a variable number of arguments. My problem is that the method is supposed to do one thing if there is only one argument, and something different if it recieves multiple arguments. If it's one argument I'm supposed to get info from a global variable, …

Member Avatar for siggivara
0
183
Member Avatar for bufospro

Hi, I would like to make a database with users. But I take errors in the function Could someone help me please? My code is : [CODE]typedef struct user user; int id2=0; struct user { char name[20]; char last[20]; int id; }; int function(user* users, int id, char name[], char …

Member Avatar for bufospro
0
90
Member Avatar for Pim

Hello, [code] #include <stdio.h> int main(void) { enum BOOL {foo, bar}; enum BOOL bFlag; return 0; } [/code] When I compile this and run it AntiVir claims it's the TR/Eplx.IMG-WMF.bfg trojan. Isn't that weird?

Member Avatar for Ancient Dragon
0
51
Member Avatar for furqankhyraj

dearest i want to make a program in which i want to move a "%" to each side of a screen so how could be made please help earlier

Member Avatar for sapan645
-1
133
Member Avatar for kgomes

In an assignment for class we have to ask the user how many characters they'd like to enter and then read the characters into an array of that size. I've had problems with calling a function to do this. I will also be passing this array to other functions, so …

Member Avatar for gerard4143
1
95
Member Avatar for bufospro

Hi, I need your help for my program. My code is : [CODE] void user() { char str[15]; int i=0; do{ printf("\nPrint str.\n"); fgets(str,15,stdin); i = strlen(str); }while(i>15); } void menu() { printf("Press :\n"); printf("0. \n"); printf("1. \n"); printf("2. \n"); } int get_choice() { int choice = 0 ; const …

Member Avatar for bufospro
0
131
Member Avatar for pmee

Hi, I'm new to this site so apologies for any mistakes. I'm trying to write a program to parse string from a file. In each string I then have to parse the different strings for example: add h'13', 4 So I've to parse the 'add' bit, the '13' bit and …

Member Avatar for pmee
1
97
Member Avatar for harshchandra
Member Avatar for cabosun

I am suppose to make a MakeFile for the 2 source files named p4a.c and p4b.c Am i doing this makefile correctly? Any suggestions would be so helpful my MakeFile so far [CODE].SUFFIXES: .c .o CC - gcc CFLAGS = -g .c.o: $(CC) $(CFLAGS) -c $, sample: p4a.c p4b.c gcc …

Member Avatar for gerard4143
0
113
Member Avatar for hapyharra
Member Avatar for gerard4143
0
159
Member Avatar for candoc

If I am fread()'ing through a file and want to append it when i find a particular item, can i just do an fwrite() when i find it or do i have to first fseek() to that location and then do an fwrite()?

Member Avatar for Tom Gunn
0
113
Member Avatar for want_to_code

[B]Given an array of elements. An element is called as a leader if it is greater than all the elements to the right of it. Print all the leaders in O(n)?[/B] The following is my approach.Can anyone tell me how to improve the code and also the current time complexity? …

Member Avatar for thines01
0
120
Member Avatar for henabibi

I am trying to run this program but it is giving "unable to open socket" eror. i am running this program on a server via putty which is hosted in my univerity server with wireless network. the code is : [code=c]#include <pthread.h> #include <netinet/ip.h> #include <netinet/tcp.h> #include <stdlib.h> #include <sys/socket.h> …

Member Avatar for Nick Evan
0
174

The End.