15,550 Topics

Member Avatar for
Member Avatar for ahp@aol.in

hi all, plz explain me. in following code[code] int main() { int arr[5] = {1,2,3,4,5}; printf("\n *arr = %d", *arr); printf("\n *arr = %d", *(++arr)); return 0; } [/code] why printf("\n *arr = %d", *(++arr)); this line giving error: '++ needs l-value'

Member Avatar for ahp@aol.in
0
125
Member Avatar for lionaneesh

Hello/Hi, I m new to this pool of C. I wass just reading a book named "C TUTOR" this book is gr8.. but i cannot understand the subscripts of 2D arrays... I find them pretty hard.. Plz tell me wat exactly the below programme mean of suggest me some simple …

Member Avatar for WaltP
0
286
Member Avatar for micjan

please make a factorial number that the output is like this: Enter a number:5 5!=1*2*3*4*5 5!=120 likewise Enter a number:6 6!=1*2*3*4*5*6 6!=720 please..help. using for loop statement only. please do not use #include<iostream.h>... use this example: #include <stdio.h> #include <conio.h> ........etc. please...help me...

Member Avatar for WaltP
-3
122
Member Avatar for DarkC0de

hi when I use this with my program i have msg tell me about the warning in my program please any one explain it thanks

Member Avatar for UncleLeroy
0
1K
Member Avatar for rgpii

I have an assignment that calls for me to only use standard C. I am currently trying to take in input from a file using fopen() and then take in lines from the file using fgets(). The original problem was that fgets() quits taking in input after six lines. "Something" …

Member Avatar for rgpii
0
187
Member Avatar for csurfer

Hello Everyone, I am developing a kernel module which acts as a sniffer and also a module which edits the TCP packet window size as per requirement of the admin. And in the process I developed this kernel module which is tainting my kernel (Opensuse11.2).The sniffing module developed by me …

Member Avatar for nezachem
0
296
Member Avatar for rjani1

Dear All, I am trying to code a multistage timer which prints out a line of text. The timer countdowns from a certain point in time and then prints out a line at times defined in an array. The array is sizable so there is no fixed length. The user …

Member Avatar for rjani1
0
130
Member Avatar for lionaneesh

[CODE]#include<stdio.h> int main() { int yo[4][4]; int b; int c; for(b=0;b<12;b++) { c=0; while(c<5) { yo[b][c]=(b*c); printf("a[%d][%d] = %d\n",b,c,(yo[b][c])); c++; } } getchar(); return(0); } [/CODE] The above code starts with b=7 why!!!!!! compile the programme and u will understand my problem .. plz helpp...... help... Thnx in advance........

Member Avatar for xavier666
0
124
Member Avatar for tyke17

hello, i am new to vc++, can i write and run c program in vc++? if yes, please explain how to do so.

Member Avatar for strmstn
0
94
Member Avatar for unli25

for exmple i want to convert this string "21 4 5 7 - + -".. how can i get the numbers separately and parce it with the other symbols..

Member Avatar for WaltP
0
110
Member Avatar for aslk

I am having trouble with this array. I need to sort the second column in descending order. Please have a look and tell me where I went wrong. Much appreciated. [CODE]const int sizex=20; const int sizey=2; void descend(int arrayx[][sizey],int sizex,int sizey); void printarray(int arrayx[][sizey],int sizex,int sizey); int main() { int …

Member Avatar for shah1248
0
151
Member Avatar for Morrac

To start off with this is a homework assignment for my Operating Systems course and I am stumped. The prof wants us to read in a source code file and take out all the comment lines and then output the file back into a new source code file. We can …

Member Avatar for shah1248
0
159
Member Avatar for spursfan2110

Hey everyone, this program's been killing me. I have to create a program that takes another program as input and counts the lines. Pretty simple, except that to do this, you have to count semicolons which means you have to negate semicolons that are comment text or within double quotes. …

Member Avatar for spursfan2110
0
100
Member Avatar for whoamineo89

I've been given a practical where I have develop a random bubble sort algorithm and I've created one already where the user enters the elements needed to arrange the numbers, I now have to use a random number generator that uses a set of 10 random numbers from 1-10000 and …

Member Avatar for WaltP
0
113
Member Avatar for bperry09

I keep getting the warnings such as "warning: passing argument 2 of ‘strcmp’ makes pointer from integer without a cast" about strcmp and strdup. I'm pretty new to C and I feel like I've tried a million things with no luck...I don't really get what's going on. Any help would …

Member Avatar for WaltP
0
214
Member Avatar for donelliewhyte

my true objective is to read back for the file into the structure but i am just not making any progress. I have placed an attachment of the file. I am just not comprehending all of the codes that i am seeing from the snippets. So can someone please give …

Member Avatar for WaltP
0
96
Member Avatar for iNach

Hey, I have another problem... I am using a FOR loop which is making a lot of lines. The problem is that the new lines "runs over" the first lines because there is no room for the new ones. In shortly, when a new line comes and have no room, …

Member Avatar for mitrmkar
0
148
Member Avatar for donelliewhyte

I these contents below written to a file.I want to user to input a number and i will then scan the file to see if it matches my registration number. But in doing this i just want to get the 1001 from the first line. REGISTRATION: 1001 NAME Donellie Whyte …

Member Avatar for Adak
0
116
Member Avatar for iliali16

Guys I am not a good C programmer. I ahve experience with object oriented paradigms such as Java and C# but I never programmed in C or Pascal. I have done some tutorials in C and I seem to grasp some of the ideas of the language but as I …

Member Avatar for jephthah
0
285
Member Avatar for spursfan2110

Hi everyone, I'm kind of stuck, is this the correct notation to compare a char to double quotes? variable == "\""

Member Avatar for spursfan2110
0
140
Member Avatar for 143wena

please help me on this.. i have to make a payroll system using turbo C program but i don't know how to make it.. pretty please...:)

Member Avatar for WaltP
-1
602
Member Avatar for donelliewhyte

IF i write to file REGISTRATION NUMBER :1001 how can read back from the file the 1001. Thank you for all your help,i have gotten other hints but they don't seem to work

Member Avatar for jephthah
0
76
Member Avatar for uday.rnsit

Hii friends.. this is [B]uday[/B] here.. i'm new to Daniweb.. [B]I want to learn programming in C .. Pls can u guide me hw cud i b a good programmer?.... [/B]

Member Avatar for jephthah
-2
123
Member Avatar for nirav99

How can i call (execute) a file (with ".c" extention) from the particular path without including it into main file ? Now the file which we have to call from particular path is containing only a function (without "main()").....

Member Avatar for WaltP
0
69
Member Avatar for nhalavanja

Hello all, I have been assigned in my class to come up with a program that is written in c and generates prime numbers from 2 to n. I have coded the problem but i have a problem. Any numbers greater than 6479 will not return the results that I …

Member Avatar for Salem
0
107
Member Avatar for johndoe444

In the following program though most of the working part of the program is commented out, it gives seg fault. reducing the value of MAX to say 10000 removes the seg fault. Why is this happening? it should be only 1 MB only. Is 1 MB too big for an …

Member Avatar for Salem
0
167
Member Avatar for milind123

A discrete time counter oscillator expressed in C code wil produce sine wave like signal: P,P+ and g represents the current phase, next phase value, and increment value respectively. To implement this in software the register is simply a variable that retains its value between updates and the look up …

Member Avatar for jephthah
-5
124
Member Avatar for dumbncool

Hi, I recently came across a code which had the below lines. [code] unsigned int n = 10; n ^= (unsigned int) - 1 ; [/code] It is not clear to me what the second line does. Anyone can help please :)

Member Avatar for jephthah
0
122
Member Avatar for lecotti

Hello all, long time since i've posted anything here. Working on a small project and nearing the end; however i am having some trouble regarding pointers to 'multidimensional' arrays, hopefully somebody can help me out. :) I have what i think is an array of 2D arrays of which I …

Member Avatar for lecotti
0
132
Member Avatar for kedarm

Hi! My problems are more of porting a code to Windows, than the code itself. I need to download a file from a URL ( http://127.0.0.1/img.jpg ) and store it in a local file. I think I've screwed up the setting up of the libcurl libraries. I am using Visual …

Member Avatar for Salem
0
1K

The End.