10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm trying to write a programme which scans strings to find how many vowels they contain. I get an error saying that I'm trying to compare a pointer and an integer inif(*v == scanme){. How can I overcome this ? Also, the programme seems to scan only the first word of a string e.g.: if I type "abc... (1 Reply)
Discussion started by: fakuse
1 Replies
2. Programming
Hi guys :D
I am still playing with my C handbook and yes, as you can see I have small problem as always :cool:
I wrote a C code
#include <stdio.h> #define MESSAGE 100 int main(void) { char input_mes - Pastebin.com
And when I try to compile it I get following errors from gcc
... (1 Reply)
Discussion started by: solaris_user
1 Replies
3. Solaris
hello,
i am writing a script that takes the UID from the PASSWD and then i want
to increse the Number by one. for the Next user.
i cannot get this to work that a variable is as interger
example:
set i = 0
set $i = $+1
it's in tcsh if it's mather (10 Replies)
Discussion started by: shatztal
10 Replies
4. Shell Programming and Scripting
I would like to know the maximum integer that a variable can hold. Actually one of my variable holds value 2231599773 and hence the script fails to process it.Do we have any other data type or options available to handle this long integers? (9 Replies)
Discussion started by: michaelrozar17
9 Replies
5. Programming
I use solaris10,following is tcp client code:
#include "cliserv.h"
int main(int argc,char argv){
struct sockaddr_in serv;
char request,reply;
int sockfd,n;
if(argc!=2)
err_quit("usage: tcpclient <IP address of server>");
if((sockfd=socket(PF_INET,SOCK_STREAM,0))<0)
... (1 Reply)
Discussion started by: konvalo
1 Replies
6. Programming
If one wants to get a start address of a array or a string or a block of memory via a function, there are at least two methods to achieve it:
(1) one is to pass a pointer-to-pointer parameter, like:
int my_malloc(int size, char **pmem)
{
*pmem=(char *)malloc(size);
if(*pmem==NULL)... (11 Replies)
Discussion started by: aaronwong
11 Replies
7. Programming
A question to ask.
seq1 = "eeeeeeeeeeeeeeeeee";
seq2 = "dddddddddddddddddddd";
char a = '*';
strcat(*seq2, &a);
strcat(*seq1, seq2);
compilation
warning: passing arg 1 of `strcat' makes pointer from integer without a cast
thanks (4 Replies)
Discussion started by: cdbug
4 Replies
8. UNIX for Dummies Questions & Answers
Hello,
I am in following situation.-
COUNT=`ls -l | wc -l`
echo $COUNT
---> 26
NO_OF_FILES=$COUNT-1
echo $NO_OF_FILES
---> 26-1
Here, I want the output to be 25. How could I do this. It seems simple, but I am not getting it. Please help me. (2 Replies)
Discussion started by: The Observer
2 Replies
9. Programming
can u tell me the reson that why we should not delete a pointer twice.?
if we delete ponter twice then what happen and why this happen
Regards,
Amit (2 Replies)
Discussion started by: amitpansuria
2 Replies
10. Programming
I received a warning when I tried to compile my program that said:
warning: comparison between pointer and integer
Could you please explain to me what this means, and in what ways I could possibly fix this?
Thanks for your help! (2 Replies)
Discussion started by: sjung10
2 Replies