| | |
how to add the mobile number in the employee information system in c language
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jan 2009
Posts: 6
Reputation:
Solved Threads: 0
Hello,
I am developing the project of "Employee Information System" using C language, In this project i want to add the mobile number for the each employee {Each Mobile number having 7 characters, Bcoz if we using the integer means, Any of one employee has no mobile number it’s not print the "0000000" format of mobile number} So if it okay means You will send the clear details about, "How to add the mobile number and also How to increase that to each employee "ASAP.
Contact Mail ID : [removed]
Thanks & Regards,
B.Karthikeyan
I am developing the project of "Employee Information System" using C language, In this project i want to add the mobile number for the each employee {Each Mobile number having 7 characters, Bcoz if we using the integer means, Any of one employee has no mobile number it’s not print the "0000000" format of mobile number} So if it okay means You will send the clear details about, "How to add the mobile number and also How to increase that to each employee "ASAP.
Contact Mail ID : [removed]
Thanks & Regards,
B.Karthikeyan
Last edited by Narue; Jan 21st, 2009 at 1:20 pm. Reason: snipped emails
Karthikeyan.B
Re: how to add the mobile number in the employee information system in c language
0
#2 Jan 21st, 2009
Use char string[10] .
Last edited by ithelp; Jan 21st, 2009 at 8:05 am.
•
•
Join Date: Jan 2009
Posts: 6
Reputation:
Solved Threads: 0
Re: how to add the mobile number in the employee information system in c language
0
#3 Jan 21st, 2009
•
•
Join Date: May 2008
Posts: 640
Reputation:
Solved Threads: 104
Re: how to add the mobile number in the employee information system in c language
0
#4 Jan 21st, 2009
•
•
Join Date: Nov 2008
Posts: 90
Reputation:
Solved Threads: 8
Re: how to add the mobile number in the employee information system in c language
0
#5 Jan 21st, 2009
You can enter the first mobile number
rest all the numbers will be as
C Syntax (Toggle Plain Text)
scanf("%d",&mobileno[0];
C Syntax (Toggle Plain Text)
for(i=0;i<n;i++) mobileno[i+1]=mobile[i]+1;
•
•
Join Date: Jan 2009
Posts: 6
Reputation:
Solved Threads: 0
Re: how to add the mobile number in the employee information system in c language
0
#6 Jan 22nd, 2009
•
•
•
•
It seems as if you have a solution in mind, why don't you try to implement it and if you have any trouble, post your code along with the question. (Something like "I expected it to do ___ but it is doing ___")
Oh, and when posting c code, please use c code tags
[code=c]
/* Your code here */
[/code]
HI,
I store employee's 7digit phone number as string. I want to allocate numbers to them For each employee the phone number should be 1 value greater than previous employee.
So, I need to increment ph number by 1.
How to increment a string?
Regards,
Karthikeyan.B
Karthikeyan.B
•
•
Join Date: May 2008
Posts: 640
Reputation:
Solved Threads: 104
Re: how to add the mobile number in the employee information system in c language
1
#7 Jan 22nd, 2009
Please don't answer each post since your last with the same string, we all have to read through all of them.
I can't imagine any phone system where you can pre-order sequential 7 digit phone numbers, but ignoring that for now...
Why does the 7 digit phone number have to be a string?
Or if it does, why can't you convert it from a string to a number, add one and convert it back?
If you're REALLY desperate, you could convert the last character of the phone number to a number and add 1. If the number is now 10, put a '0' down for the last digit and 'carry' the one to the next-to-the last character. (At least that's how I learned to do manual addition when I was in school.)
I can't imagine any phone system where you can pre-order sequential 7 digit phone numbers, but ignoring that for now...
Why does the 7 digit phone number have to be a string?
Or if it does, why can't you convert it from a string to a number, add one and convert it back?
If you're REALLY desperate, you could convert the last character of the phone number to a number and add 1. If the number is now 10, put a '0' down for the last digit and 'carry' the one to the next-to-the last character. (At least that's how I learned to do manual addition when I was in school.)
•
•
Join Date: Jan 2009
Posts: 6
Reputation:
Solved Threads: 0
Re: how to add the mobile number in the employee information system in c language
0
#8 Jan 22nd, 2009
•
•
•
•
Please don't answer each post since your last with the same string, we all have to read through all of them.
I can't imagine any phone system where you can pre-order sequential 7 digit phone numbers, but ignoring that for now...
Why does the 7 digit phone number have to be a string?
Or if it does, why can't you convert it from a string to a number, add one and convert it back?
If you're REALLY desperate, you could convert the last character of the phone number to a number and add 1. If the number is now 10, put a '0' down for the last digit and 'carry' the one to the next-to-the last character. (At least that's how I learned to do manual addition when I was in school.)
Hi,
Bcoz,1 employee is not having a mobile no means, output for that employee is 0000000 by using string,But if i am using integer means its not possible.That y i asked you.
Regards,
Karthikeyan.B
Karthikeyan.B
•
•
Join Date: May 2008
Posts: 640
Reputation:
Solved Threads: 104
Re: how to add the mobile number in the employee information system in c language
0
#9 Jan 22nd, 2009
•
•
Join Date: Nov 2008
Posts: 90
Reputation:
Solved Threads: 8
Re: how to add the mobile number in the employee information system in c language
0
#10 Jan 22nd, 2009
![]() |
Similar Threads
- Help with automatic update problem and more (Viruses, Spyware and other Nasties)
Other Threads in the C Forum
- Previous Thread: Network Programming Questions
- Next Thread: can we allocate a 2d array dynamically in c
Views: 765 | Replies: 11
| Thread Tools | Search this Thread |
Tag cloud for C
#include * .net append array arrays bash binarysearch changingto char character cm copyanyfile copypdffile createprocess() database directory drawing dynamic execv feet fgets file floatingpointvalidation fork function functions getlogicaldrivestrin givemetehcodez global grade graphics gtkwinlinux histogram homework i/o ide include infiniteloop initialization input interest intmain() iso keyboard kilometer lazy license linked linkedlist linux list looping loopinsideloop. lowest matrix meter microsoft mqqueue mysql oddnumber odf open openwebfoundation overwrite pause pdf pointer pointers posix power process program programming pyramidusingturboccodes read recursion recv recvblocked reversing segmentationfault single socket socketprogramming spoonfeeding standard strchr string student suggestions system test testing threads unix urboc user whythiscodecausesegmentationfault win32api windowsapi






