12-07-2011
Simplifies the code. If not done this way, you would have to have extra code to handle the n = 0 case.
This User Gave Thanks to fpmurphy For This Post:
9 More Discussions You Might Find Interesting
1. Programming
i know what is the use of atoi function....
converts string to int.
but whenever i use that it gives me 0....
could any one help in this issue..
eg.
int i;
char str;
str="name";
i=atoi(str);
i gives me 0. why? (3 Replies)
Discussion started by: bankpro
3 Replies
2. Shell Programming and Scripting
Can one string type variable changed into the date type variable. (1 Reply)
Discussion started by: rinku
1 Replies
3. Shell Programming and Scripting
Hello,everyone here.
I'm coding with KSH to achieve exploring the disk space and judging whether it closes to overflow.But It seems that no one way to convert a string variable to integer.
df | read A B C D E F G H I J K L
print ${L}
Can I convert L to integer type?
Thanks for... (2 Replies)
Discussion started by: joshuaduan
2 Replies
4. Programming
Dear colleagues,
One of my friend have a problem with c code. While compiling a c program it displays a message like
"array type has incomplete element type". Any body can provide a solution for it.
Jaganadh.G (1 Reply)
Discussion started by: jaganadh
1 Replies
5. Shell Programming and Scripting
Hi,
I have a requirement to capture file time stamp and compare with current system time. I am using HP-AUX K-shell.
Below is what i have done
Getting current date into myfile2
---------------------------------
date +%Y%m%d%H%M%S > myfile2
20091110132800
Getting the file date into... (5 Replies)
Discussion started by: chinniforu2003
5 Replies
6. UNIX for Advanced & Expert Users
Hi all,
I have one libxxx.so file ( which I got from a third party ). We use shared library libxxx.sl . Is there any way to convert the .so file to .sl file ?
Thanks in advance
- M (3 Replies)
Discussion started by: kanu_kanu
3 Replies
7. Programming
I have a PORT_NUM macro (10 digits long number)
in a server file, if i do
htons(PORT_NUM)
i get
warning: this decimal constant is unsigned only in ISO C90
warning: large integer implicitly truncated to unsigned type
whats wrong with this? (2 Replies)
Discussion started by: omega666
2 Replies
8. Shell Programming and Scripting
Hello All,
I have a requirement to convert a 12 hour format to 24 hour time format and the sample input /out put is below
Input Time format : Nov 2 2011 12:16AM
Out Put Format : Nov 2 2011 0:16
Input : Nov 2 2011 4:16PM
Out Put: Nov 2 2011 16:16
I have done this using a... (6 Replies)
Discussion started by: jambesh
6 Replies
9. Programming
So, I'm into about 650 lines of some code I'm working on. So I'll try to explain instead of flooding this post. Say I have some code like this:
int main() {
int i, j;
char data;
printf("Gimme something: ");
fgets(data, INPUT_BUFF, stdin);
for (j = 0; j < data; j++){... (6 Replies)
Discussion started by: Azrael
6 Replies