Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Sams Teach Yourself Visual C++ 6 in 21 Days - ebook

For the majority of C++ programmers, the pace and style of David Chapman’s Teach Yourself Visual C++ 6 in 21 Days will make a good deal of sense. The author covers all the essentials of basic Windows and Microsoft Foundation Classes (MFC) development, and then addresses several new features in Visual C++ 6, all while moving quickly enough for the busy, working programmer.

Chapman’s first section introduces the basic Visual C++ 6 tools, like the AppWizard and ClassWizard, and discusses the essentials of building dialog-based applications using basic Windows controls such as static text, edit, button, and list box controls. Further chapters cover mouse and keyboard basics, timers, menus, and fonts. In short, the first week provides a traditional introduction to Windows and MFC programming without the frills.

The second set of tutorials delves into Graphical Device Interface (GDI) graphics programming, always a challenging topic for new MFC programmers. Then the author moves to using ActiveX controls inside your applications (a real strength of Visual C++, enhanced in the new release). The basics of toolbars, saving and restoring files to MFC applications, and an introduction to Open Database Connectivity (ODBC) programming round out this set of chapters.

The last set of exercises will give the MFC developer some new expertise. First, the author looks at the potential of ActiveX Data Objects (ADOs) for database development and how to build reusable libraries in both static and dynamic targets. Advanced material introduces the basics of networking and the TCP/IP protocol and discusses MFC support for working with the Web.

For readers with a little more time, handy appendices discuss additional topics such as printing, the MFC container and helper classes, and the basics of exception handling and debugging. Clearly, the constraints of the 21-day format have not prevented this author from successfully covering many essential topics in today’s MFC programming with a good level of detail.

Learn Visual C++ through the Teach Yourself series, with sections on: Q&A, Do’s and Don’ts, Workshop, Shaded syntax boxes, Type/Output/Analysis icons. Week One starts you with Visual C++. After installing and maneuvering through the components of the software, you’ll examine a preliminary program to get the feel for C++ and Visual C++. You’ll learn: C++ basics; hierarchies; members, functions, and objects; inheritance; MFC; installing Visual C++, the Visual C++ compiler. In Week Two, you’ll look at components of Windows applications and how they are invoked with Visual C++. Topics include: keyboard input; mouse usage; data file handling; lists and serialization; toolbars and status bars; graphics; and projects. Week Three examines the more involved aspects of Visual C++ and Windows applications.


DOWNLOAD eBook Here

The C++ Programming Language by Bjarne Stroustrup 3e


 
C++ Programming Language, The: Special Edition, 3/E 
Bjarne Stroustrup 

ISBN-10: 0201700735
ISBN-13: 9780201700732
Publisher: Addison-Wesley Professional
Format: Cloth; 1040 pp
Published: 02/01/2000
Status: Instock


Bjarne Stroustrup is the designer and original implementer of C++, the author of The C++ Programming Language, The Annotated C++ Reference Manual, and The Design and Evolution of C++, and the consulting editor of Addison-Wesley's C++ In-Depth Series. Having previously worked at Bell Labs and AT&T Labs-Research, he currently is the College of Engineering Chair in Computer Science Professor at Texas A&M University. The recipient of numerous honors, including the Dr. Dobb's Excellence in Programming Award (2008), Dr. Stroustrup is a member of the National Academy of Engineering, an AT&T Fellow, an AT&T Bell Laboratories Fellow, an IEEE Fellow, and an ACM Fellow. His research interests include distributed systems, simulation, design, programming techniques, software development tools, and programming languages, and he remains actively involved in the ANSI/ISO standardization of C++. Dr. Stroustrup holds an advanced degree from the University of Aarhus in his native Denmark and a Ph.D. in Computer Science from Cambridge University, England.


The Complete C++ Training Course, Fourth Edition DEITEL

Language: English 
Publisher: Prentice Hall
Year: 2003
ISBN: 013100252X
Format:PDF + ISO
Pages: 390 pages
Size: 670 MB

Harvey and Paul Deitel are world famous for their best-selling books on programming and their signature LIVE CODE® approach to teaching programming languages. Using their new book C++ How to Program, Fourth Edition and the C++ Multimedia Cyber Classroom, the team at Deitel and Associates, Inc. provides the fastest and most effective way to learn how to program in C++. The course covers every key concept and technique ANSI C++ developers need to master: control structures, functions, arrays, pointers and strings, classes and data abstraction, operator overloading, inheritance, virtual functions, polymorphism, I/O, templates, exception handling, file processing, data structures, and more. The multimedia CD-ROM allows you to "learn by doing" with over 250 LIVE-CODE® programs consisting of over 14,000 lines of code. Listen as the experts provide over 14 hours of detailed audio descriptions of the code, then fine tune your skills with hundreds of programming exercises and interactive exercises. Take advantage of the exceptionally comprehensive coverage of C++ programming concepts in the fully searchable e-book on the CD and the printed edition in the package. You'll be a C++ expert faster than you ever imagined! 

C++ How to Program, 5/E

(Harvey & Paul) M Deitel & Deitel) 
ISBN-10: 0131857576 
ISBN-13: 9780131857575
Publisher: Prentice Hall
Copyright: 2006
Format: Paper; 1536 pp
Published: 01/05/2005

With over 250,000 sold, Harvey and Paul Deitel's C++ How to Program is the world's best-selling introduction to C++ programming. Now, this classic has been thoroughly updated! The Deitels' groundbreaking How to Program series offers unparalleled breadth and depth of programming concepts and intermediate-level topics for further study. The books in this series feature hundreds of complete, working programs with thousands of lines of code. Deitels' C++ How to Program is the most comprehensive, practical introduction to C++ ever published-with hundreds of hands-on exercises, roughly 250 complete programs written and documented for easy learning, and exceptional insight into good programming practices, maximizing performance, avoiding errors, debugging, and testing. The updated Fifth Edition now includes a new early classes pedagogy-classes and objects are introduced in Chapter 3 and used throughout the book as appropriate. A new OOD/UML ATM case study replaces the elevator case study of previous editions, and UML in the OOD/UML case study and elsewhere in the book has been upgraded to UML 2. The Fifth Edition features new mini case studies (e.g., GradeBook and Time classes). An employee hierarchy replaces Point/Circle/Cylinder to introduce inheritance and polymorphism. Additional enhancements include tuned treatment of exception handling, new “Using the Debugger” material and a new "Before You Begin" section to help readers get set up properly. Also included are separate chapters on recursion and searching/sorting. The Fifth Edition retains every key concept and technique ANSI C++ developers need to master: control statements, functions, arrays, pointers and strings, classes and data abstraction, operator overloading, inheritance, virtual functions, polymorphism, I/O, templates, exception handling, file processing, data structures, and more. It also includes a detailed introduction to Standard Template Library (STL) containers, container adapters, algorithms, and iterators

Computing for Numerical Methods Using Visual C++


Computing for Numerical Methods Using Visual C++ 
Shaharuddin Salleh, Albert Y. Zomaya, Sakhinah A. Bakar 
ISBN: 978-0-470-12795-7
Hardcover
448 pages
January 2008


Computing for Numerical Methods Using Visual C++ fills the need for a complete, authoritative book on the visual solutions to problems in numerical methods using C++. The book takes an interdisciplinary approach to the subject and demonstrates how solving problems in numerical methods using C++ is dominant and practical for implementation due to its flexible language format, object-oriented methodology, and support for high numerical precisions.

Chapter 1: Overview of C++. 
Language style and organization. 
Data types, variables. 
Loops and branches. 
Array, pointer, function, structure. 
Classes and objects. 
Inheritance, polymorphism, encapsulation. 
Complexity analysis. 

Chapter 2: Visual C++ Methods. 
MFC library . 
Fundamental interface tools. 
Text displays. 
Graphics and images. 
Writing the first program. 

Chapter 3: Fundamental Mathematical Tools. 
C++ for High-Performance Computing. 
Dynamic memory allocation. 
Allocation for one-dimensional arrays. 
Allocation for higher-dimensional arrays. 
Case Study: Matrix multiplication problem. 
Matrix elimination problems. 
Vector and matrix norms. 
Row operations. 
Matrix reduction to triangular form. 
Computing the determinant of a matrix. 
Computing the inverse of a matrix. 
Matrix algebra. 
Data passing between functions. 
Matrix addition and subtraction. 
Matrix multiplication. 
Matrix inverse. 
Putting the pieces together. 
Algebra of complex numbers. 
Addition and subtraction. 
Multiplication. 
Conjugate. 
Division. 
Inverse of a complex number. 
Putting the pieces together. 
Number Sorting. 
Programming Exercises. 

Chapter 4: System of Linear Equations. 
Systems of Linear Systems. 
Existence of Solutions. 
Elimination Techniques. 
Gauss Elimination Method. 
Gauss Elimination with Partial Pivoting. 
Gauss-Jordan Method. 
LU Factorization Techniques. 
Crout Method. 
Doolittle Method. 
Cholesky Method. 
Thomas Algorithm. 
Iterative Techniques. 
Jacobi Method. 
Gauss-Seidel Method. 
Visual C++ Solution Interface. 
Summary. 
Programming Exercises. 

Chapter 5: Nonlinear Equations. 
Iterative methods: convergence, stability. 
Background: existence of solution, MVT, errors, etc.. 
Bisection method. 
False-point position method. 
Newton method. 
Secant method. 
Fixed-point iterative method. 
Visual C++ Solution Interface. 
Summary. 
Programming Exercises. 

Chapter 6: Interpolation and Approximation. 
Concepts, existence, stability. 
Lagrange. 
Newton methods: forward, backward. 
Stirling method. 
Cubic spline interpolation. 
Least-square approximation. 
Visual C++ Solution Interface. 
Summary. 
Programming Exercises. 

Chapter 7: Differentiation and Integration. 
Taylor series. 
Newton methods (forward, backward, central). 
Trapezium method. 
Simpson method. 
Simpson 3/8 method. 
Gauss quadrature. 
Visual C++ Solution Interface. 
Summary. 
Programming Exercises. 

Chapter 8: Eigenvalues and Eigenvectors. 
Characteristic polynomials. 
Power method. 
Power method with shifting. 
Visual C++ Solution Interface. 
Summary. 
Programming Exercises. 

Chapter 9: Ordinary Differential Equations. 
Existence, uniqueness, stability, convergence. 
IVP: Taylor method. 
Euler method. 
Runge-Kutta of order 2 method. 
Runge-Kutta of order 4 method. 
Higher dimensional orders. 
Multistep methods: Adams-Bashforth method. 
Boundary Value Problems: finite-difference method. 
Visual C++ Solution Interface. 
Summary. 
Programming Exercises. 

Chapter 10: Partial Differential Equations. 
Existence, uniqueness, stability, convergence. 
Elliptic problem: Laplace equation. 
Elliptic problem: Poisson equation. 
Parabolic problem: heat equation. 
Hyperbolic problem: wave equation. 
Visual C++ Solution Interface. 
Summary. 
Programming Exercises. 

Chapter 11: Finite Element Methods. 
One-dimensional heat problem. 
Linear approximation. 
Quadratic approximation. 
Two-dimensional problem: triangulation method.
Visual C++ Solution Interface. 
Summary. 
Programming Exercises

DOWNLOAD HERE

Accelerated C++ Practical Programming by Example - Ebook

Auther: Andrew Koenig, Babara E.Moo
Publisher: Addison Wesley
Publication: 2000, 
Language: English 
ISBN: 9780201703535
Pages: 336


Description:

If you don’t have a lot of time, but still want to learn the latest in C++, you don’t have to learn C first. You might learn more by digging into current language features and classes from the very beginning. That’s the approach that’s offered by Accelerated C++, a text that delves into more advanced C++ features like templates and Standard Template Library (STL) collection classes early on. This book arguably can get a motivated beginning programmer into C++ more quickly than other available tutorials.
What separates this title from the rest of the pack is that it jumps right in with samples that take advantage of the Standard C++ of today–from streams to built-in container classes, such as vectors and linked lists. Early examples are more complex than in other books, but the thoroughness and relaxed pace of the explanations will bring the novice up to speed. (Although it ships at a slender 350 pages, Accelerated C++ is packed with samples, tips, and example problems; about 10 per chapter.)
After a tour of basic C++, the book looks at more advanced C++ features, such as templates, including built-in support for containers. Besides tapping the strength of Standard C++, you also will learn to design with your own templates. (Other tutorials would defer this material until later on.) The authors have tested the approach in the book in their own teaching, and honed a set of worthwhile examples that will help anyone get familiar with these powerful language features. All examples make use of the command line and console (without GUI programs), but the advantage is that this code should run on any of today’s operating systems and compilers. Later sections cover the basics of class design, which include good coverage of operator overloading and inheritance.
With its innovative approach to teaching the language, Accelerated C++ will challenge readers in the right way. It suggests that you don’t need to learn C to be productive in C++. Written in an approachable style, it deserves a close look from any C++ novice. –Richard Dragan
Topics covered:Introduction to C++Console I/O with stream classesBasic string handlingLoop and flow-control statementsArraysUsing functions and methodsUsing Standard Template Library (STL) containers (vectors, linked lists, and maps)IteratorsSorting and generic functionsBasic class designPointers and arraysFile I/OMemory-management techniques, including statically and dynamically allocated memoryAdding stream support to custom classesConversion operatorsOperator overloadingFriend functionsInheritancePolymorphism and virtual functionsHandle idioms for classes, including reference countingQuick reference to the C++ language
Book DescriptionWhy is Accelerated C++ so effective? Because it
*Starts with the most useful concepts rather than the most primitive ones: You can begin writing programs immediately.*Describes real problems and solutions, not just language features: You see not only what each feature is, but also how to use it.*Covers the language and standard library together: You can use the library right from the start.
The authors proved this approach in their professional-education course at Stanford University, where students learned how to write substantial programs on their first day in the classroom.


Visual Basic 2005 For Dummies - Ebook

Author(s): Bill Sempf  
Publisher: Wiley
Year: Nov 2005
ISBN: 076457728X
Language: English
Pages: 362
File type: PDF

Size (for download): 5.3 MB    

Welcome to the new version of Visual Basic for 2005. As its name implies, Visual Basic is a visual way to create new programs for the Micro$oft Windows family of operating systems.

And though it is basic in many ways, the Visual Basic language is also very powerful. You can create new class libraries and XML Web services, as well as programs that you can use on your PC or your Web browser, or even your phone or PDA. Anything that can be done in Windows can be done in Visual Basic.

Programming in Visual Basic is easier than you might think, thanks to the visual tools supplied by Visual Studio. You donít have to type line after line of code to create a working program ó Visual Studio automatically generates some code for you when you drag and drop components with the visual tools. Of course, being able to read and write code is important too, and this book provides plenty of code samples so you can understand the inner workings of your programs.

This book also shows you some best practices to keep in mind as you get further along in your programming. Your first programs may be very simple, but when you start getting into more complicated applications, you really need to plan out your program before you start writing the code.



TABLE OF CONTENT:

Chapter 01 - Wading into Visual Basic
Chapter 02 - Using Visual Studio 2005
Chapter 03 - Designing Applications in VB 2005
Chapter 04 - Building Windows Applications
Chapter 05 - Building Web Applications
Chapter 06 - Building Class Libraries
Chapter 07 - Building Web Services
Chapter 08 - Debugging in VB 2005
Chapter 09 - Interpreting Strings and Things
Chapter 10 - Making Decisions in Code
Chapter 11 - Getting Loopy
Chapter 12 - Reusing Code
Chapter 13 - Making Arguments, Earning Returns
Chapter 14 - Writing Secure Code
Chapter 15 - Accessing Data
Chapter 16 - Working with the File System
Chapter 17 - Accessing the Internet
Chapter 18 - Creating Images
Chapter 19 - Ten Tips for Using the VB User Interface
Chapter 20 - Ten Ideas for Taking Your Next Programming Step
Chapter 21 - Ten Resources on the Internet

DOWNLOAD PDF HERE

Object-Oriented Programming by Robert Lafore - Ebook

This book is not a book about OO Program design more the OOP extensions and mechanics of C++. To do OOP one needs to design the program as such from the start. There are no detailed methods given.

The book is primarily for University students on a Programming or SW Eng courses. It is for this reason, I suppose, that each of the 12 chapters has 3 or 4 pages of exercises. There are no answers. This may be OK where there is a lecturer around to check one's answers but for the rest of us there should be some answers otherwise it is 40 odd pages wasted.

There is a lot of comparison between C++ and ANSI C. It appears that the author assumes that one will be converting from C. Though programmers proficient in other languages should have little trouble with this and will pick up ANSI C as well.

The book starts with an OOP/C++ overview that introduces, in passing, many topics covered in later chapters. This gives a good grounding in the philosophy of C++ that is subtly different to C in many places.

Forward referencing continues through the book as it works its way through C++/C: Objects, classes, polymorphism, inheritance, exceptions etc. This is one reason why it is not suitable for novices. Experienced programmers will not be put off by an example program on page 11 containing classes and functions many chapters before a full explanation of classes. The style is terse and authoritative.

The final section discusses OOP in the wider context of current programming trends and other languages. Methodologies are discussed though not in great detail. The last 100 pages are a concise C++ language guide that is a useful reference. This guide takes AT&T C++ R3.0 into account.

The short programs in the book have little annotation but where explanation is required it is in shaded boxes following the program. This makes the programs clear and easy to type in. There is no support disk available. Several programs run through the book to show different techniques for the same problem.

An interesting note in the introduction assures us that "All major pieces of code were tested." This is reassuring but should be the norm not the exception that requires comment. Other authors please take note. There is no indication as to the platform used but I suspect that it was UNIX/GNU C++.

Conclusion: A good set book for students. Lecturers should look at this book for the second year OOP/SW Eng courses. Useful for converting from C (or any other language) to C++ for other programmers. Not for novices as a first OOP/C++ book.
Other Authors with the same surname


Downlaod PFD HERE

100 Sample C Programs!!!

1. Program to print text
2. Program To Read Two Numbers And Print The Sum Of Given Two Numbers.
3. Program To Accept Student Roll No, Marks in 3 Subjects and Calculate Total, Average and Print it.
4.Program To Read Three Numbers And Print The Biggest Of Given Three Numbers
5.Program To Read A Number And Find Whether The Given Number Is Even Or Odd.
6.Program to accept a year and check whether the given year IS leap year or not.
7.Individual Digits
8. Program to accept a three digit number and print the sum of individual digits.
9. Program to accept a number and check the given number is Armstrong or not.
10. Program to print ODD numbers from 1 to 10
11. Program to print natural numbers from 1 to 10 in Reverse
12. Program to print sum of the natural numbers from 1 to 10.
13. Program to accept a number and print mathematical table of the given no.
14. Program to print 1 to 10 mathematical tables .
15. Program to print fibonacci series .
16. Program to print numeric pyramid
17. Program to print numerical pyramid.
18. Program to print numerical diamond.
19. Program to print character pyramid.
20. Program to print character diamond.
21. Program to find biggest of two no by using ternary numbers
22. Program to find biggest of four no by using ternary numbers
23. Program to print smallest of four no by using ternary operators
24. Program to accept a year and check the given year is leap or not by using ternary
25. Program to accept a character in the uppercase and print in lower case.
26. Program to accept a character in any case and print in another case.
27. Program to natural number from 1 to 10 by using while loop.
28. Program to accept a string and print it by using the while loop.
29. Program to accept a string in upper case and print it by lower case.
30. Program to accept a string in any case and print
it by another case .
31. Program to accept a string print each word in new line.
32. Program to accept a string and count no of capital letters, no. of small letters and no. of special characters
33. Program to accept any single digit number and print it in words .
34. Program to print prime numbers between 1 to 100
35. Program to accept two numbers and print sum of two numbers by using functions
36. Program to accept a number and find factorial of given number
37. Program to accept a number and check the given number Armstrong or not
38. Program to accept a number and print the sum of given and Reverse number
39. Program to accept 10 numbers and print first five numbers in original order and print last five numbers in reverse order.
40. Program to accept a string and print the reverse of the given string by using for loop.
41. Program to accept a string and check the given string is palindrome or not .
42.Program to accept values into 3 dimensional array and print .
43. Program to print upper triangle .
44. Program to accept two 3 dimensional array and store addition of those into arrays into the third array .
45. Program to accept a string and find the length of the given string by using functions
46. Program to count the number of words, characters, alphabets, vowels, consonants and digit in a line of text.
47. Program to accept two string and compare the strings are equal or not
48. Program to sort the entered numbers using bubble sort.
49. Program to read date,month, year and print the next day’s date,month,year.
50. Program to interchange two values using pointers.
51. Program to print “PASCAL TRIANGLE”.
52. Program to check whether a given number is perfect or not.
53. Program to check whether a given number is prime number.
54. Program to read ‘n’ number and print them in matrix terms in all orders.
55. Program to search an element using binary search
56. Program to accept two numbers and print the sum of given two numbers by using pointers
57. Programs to multiply two Matrices
58. Program to print prime number between 1-100
59. Program to accept a string and find the length of the string
60. Program to fibanocci of matrix
61. Program a structure which reads ‘n’ students information (name,3 subjects marks) and calculate total marks, result print them in a particular format.
62. Program to find whether a square matrix is a) symmetric b) skew symmetric c) none of two.
63. Program to find area of a triangle when there sides are given.
64. Program to print Armstrong number between 1-500.
65. Program to check whether a given number is Armstrong or not.
66. Program to print the floyd’s triangle.
67. Program to read data in 3 structures and print
68. Program to print a diagonal matrix.
69. Program to copy contents of one file into another.
70. Program to create a file of number and copy odd number into second file and even number into third file.
71. Program a structure which stores information about hotels which stores information about name, grade, room change, no of rooms.
72. Program which does the below process after reading on odd no of integer.
73. Program to sort the entered elements using selection sort technique.
74. Program to find whether a number is divisible by ‘11’ or not without actual division.
75. Program to find maximum and minimum of entered ’n’ number using arrays.
76. Program to print the following series until there sum exceeds 2.6 term value exceeds 1.5x+x2/2!+x3/3!+------------.
77. Program to print a frequency distribution table for a class of 20-students in the following format. The marks range form 1-25.
78. Program to accept values into an array and print array in reverse and original format by using three different functions.
79. Program to accept values into single dimensional array and print the array in reverse by using pointers.
80. Program to read a string and print the number of characters in each word of the string.
81. Program to accept two strings and compare those two strings
82. Program to accept a string using pointers and functions.
83.Program to read a string and print the first two characters of each word in the string.
84.Program to accept two numbers and print the sum of given two numbers by using pointers
85.Program to accept a string and print reverse of the given string by using functions.
86. Program to accept two 3 dimensional array and store subtraction of those two arrays into third array..
87.Program to accept a single dimensional array and print them by using pointers
88.Program to accept two strings and biggest among them
89.Program to print 4 dimentional matrix with
constant number.
90.Prongram to accept a string and print each word in reverse
91. Program to accept elements into single dimensional array and print the array in ascending order by using three different arrays.
92.Program to accept data and store the given data into file print the data.
93. Program to accept data in lower case and store the given data into file into upper case and print the data.
94.Program to copy contents of one file into another.
95. Program to create a file of numbers and copy odd number into second file and even number into third file
96.Program to accept a string in lower case and print first character of each word in upper case.
97.Program to accept two numbers and interchange two values using functions.
98.Program for example of static variable.
99.Program to accept a string and print by trailing spaces.
100. Program to print anti diagonal.

Download HERE in PDF Format              More Program codes coming Soon!

Problem Solving Skills!

One of the most exciting aspects of life is the array of choices that we have on a daily basis. Some of our decisions are simple, like deciding what to eat for dinner or what shirt to wear. However, some choices are challenging and take careful thought and consideration.

When we are confronted with these types of decisions, it can be very difficult to decide on the best option, and we may be plagued by indecision. We may be forced to choose between two equally good options, or perhaps, we may have to pick between two choices that both have drawbacks. We may waver back and forth between different alternatives and may feel paralyzed to make the decision.

This is a very normal reaction to tough choices in our lives, and we all, at times, experience a sense of being unable to decide on some option. However, researchers have developed a technique that many people have found useful when they are trying to make a difficult decision or solve a problem that seems unsolvable. This procedure involves a series of steps that you can go through on your own when you are confronted with a decision or problem that needs to be solved. This approach may not work perfectly for all difficulties, but it may help with many of the problems you are confronted with in your life.

Step 1: Problem Orientation 

This step involves recognizing that a problem exists and that solving the difficulty is a worthwhile endeavor. It is important that you approach the decision-making process with a positive attitude and view the situation as an opportunity or challenge. You should try to approach the situation with confidence and with a willingness to devote some time and effort to finding an appropriate solution to your problem. Remember, you are a competent person, and the problem you are facing can likely be solved with a little hard work.

Step 2: Problem Definition

Before you start to tackle the current problem, it is important to clearly understand the difficulty and why you are unhappy with the current situation. This may seem obvious, but it is important that you really think about and gather information about the problem, and make sure that the problem you are trying to solve is the "real" problem. That is, sometimes people find a different problem than the one that is really distressing them, and focus on this one, since it is easier than dealing with the real problem. This step really involves your thinking about the difficulty you are having, understanding the problem, and contemplating why the situation is distressing. Some people think of problems as a discrepancy between what they want and what the current situation is like. It is useful during this stage to think about how the current situation is different from how you would like it to be, and what your goals are for the state of affairs. If you are currently facing many difficult decisions, it may be helpful to prioritize those problems and deal with them one at a time


Step 3: Generation of Alternative Solutions 

During this stage, you should ask yourself, "What have I done in this situation in the past, and how well has that worked?" If you find that what you have done in the past has not been as effective as you would like, it would be useful to generate some other solutions that may work better. Even if your behavior in the past has worked like you wanted it to, you should think of other solutions as well, because you may come up with an even better idea. When you start to think of possible solutions, don't limit yourself; think of as many possible options as you can, even if they seem unrealistic. You can always discard implausible ideas later, and coming up with these may help generate even better solutions. You may want to write a list of possible options, or ask others what some solutions they might have for your problem.

Step 4: Decision Making 

Now you are ready to narrow down some of the options that you have generated in the previous step. It is important that you examine each of the options, and think about how realistic each is, how likely you would be to implement that solution, and the potential drawbacks of each. For example, if your solution costs a great deal of money or requires many hours of effort each day, this may be too difficult to implement. You should also consider the likelihood that each option has in terms of your being able to achieve the goals that you want regarding the solution. As you start to narrow down your choices, remember, no problem solution is perfect and all will have drawbacks, but you can always revise the solution if it does not work the way you want it to work. 

Step 5: Solution Implementation and Verification 

Once you have examined all your options and decided on one that seems to accomplish your goals and minimizes the costs, it is time to test it out. Make sure that when you implement this solution, you do so whole-heartedly and give it your best effort. During this stage, you should continue to examine the chosen solution and the degree to which it is "solving" your problem. If you find that the solution is too hard to implement or it is just not working, revise it or try something else. Trying to solve these problems is never an easy task, and it may take several solutions before something works. But, don't give up hope, because with persistence and your best effort, many difficult decisions and problems can be made better!



Sorting In C++

 Sorting means arranging a set of data in some order. There are different methods that are used to sort the data in ascending order. Some of the methods are  

  Selection sort 

  Bubble sort 

  Insertion sort

1.Selection sort

  Here, to sort the data in ascending order, the 0th element is compared with all other elements. If it is greater than the compared element then they are interchanged. So after the first iteration smallest element is placed at the 0th position. The same procedure is repeated for the 1st element and so on.  

   

2.Bubble sort

  Here, to sort the data in ascending order, 0th element is compared with the 1st element. If it is greater than the 1st element then they are interchanged else remains same. Then 1st element is compared with 2nd element and procedure is continued. So after the first iteration largest element is placed at the last position. In the second iteration, the comparisons are made till the last but one position and now second largest element is placed at the second last position. After all the iterations, the list becomes sorted. 

 
3.Insertion sort

  Here, sorting takes place by inserting a particular element at the appropriate position. To sort the element in ascending order, in first iteration,1st element is compared with the 0th element. In the second iteration 2nd element is compared with 0th and 1st element. In general, in every iteration an element is compared with all the elements before it. While comparing if it is found that the element in question can be inserted at a suitable position, then space is created for it by shifting the other element one position to the right and inserting the element at the suitable position. This procedure is repeated for all the elements in the list.

Download the sample Program Here

int main() And void main() - Differeance!

We’ve been brought up with many different variations of this popular function. Some books/teachers like to write it as “int main”, some write it as “void main” and then there are some who make do with just “main”, forgoing the return type altogether. So, which one out of them is correct? Or does it even make a difference?

The answer to the 2nd question is “YES”. It makes a whole world of difference as in it could:
» do nothing
» or give you a compile time warning
» or crash the program
» or cause problems in your invocation environment

Now, we go back to the first question. Which is the correct form and why?
The answer is “int main” is the correct type for C++.
But for C, it is a bit tricky and I’d say “int main” is the recommended way.
The simple reasoning is “because the C and C++ standards say so”. (See this however, which is what is leads to a bit of confusion though and makes it implementation dependent in c)

But lets take a brief look at the practical reasons for this because you might wonder “My compiler doesn’t give me a warning for void main, so why should I care?” (If your compiler does that, then its time to switch to something else. Did I hear you are using a Microsoft compiler? ).

There is something called “startup code” (more on this soon) which is what runs first when you start your program, sets things up (e.g. initializes stack, heap, .bss etc) and then calls “main”. Now, generally this start up code expects main to return an integer value and place it onto stack. Now, if we don’t return anything (in void main’s case), it will still take something in its place, which you don’t have any control of. e.g. If this startup code expects the value to be in a certain range, it will crash if it sees something out of it. Or imagine if the caller function pops off an int from the stack but our main never put anything into it, it would screw up the stack for good. (Ever saw segfaults on a program that runs fine but crashes while exiting)

Moreover, if you are running a script that makes its basis upon such a program, a garbage value will be returned to it leading to unknown consequences.

End Note: Some would say that leaving out the type altogether and just writing “main” should be the way to go because the return type of such functions is automatically assumed to be int by the compiler. However, this is not correct because the standard does not define an intended behaviour for this and this is totally compiler dependent and hence it is not reliable.

Please post your comments about this article or if there is something that I missed out on. Also let us know if there is something in particular that you’d want us to talk about.

© Safer Code

How to Become a Programmer

You can become a computer programmer by going to college to study computer science or management information systems and beginning an entry level computer programmer job after college. However, if you cannot afford to spend years in college before you begin your programming career, you can learn programming from experienced developers or teach yourself computer programming using affordable textbooks, training courses and or coaching programs. While you are on your way to becoming a programmer you need to think about what programming languages and platforms you are going to learn. Consider learning: C#, C++, Visual Basic.Net, ASP.Net, Java, Perl, SQL and HTML. In this article I will show you how to become a computer programmer without the benefits of a traditional computer science college education.

Do I Need a College Degree To Get a Programming Job?


Programmers have the skill set of being organized, creative, persistent, analytical, paying attention to detail, communicating effectively, thinking logically, and using deductive reasoning. If you have some of those skills then you are already on your way to becoming a computer programmer. Do you love solving problems or like to know how things work? You may already have the mind set of a computer programmer already and you didn’t know it. Assuming that you have some of that mindset, let’s look at how you can translate that into a computer programming job. It’s really not that difficult because you can get hired in today’s programming job market without a college degree. This is because when it comes to programming, employers put more emphasis on your ability to write good quality code than your educational credentials. Many programmers have taken advantage of this to forgo college and focus on developing their programming skills to the best of their ability. This is why the term practice makes perfect is true in software development careers. You see, you need lots of practice in order to write good quality code that employers are interested in paying for. When I started learning programming more than a decade ago, I didn’t go out immediately and invest money on development tools, instead I downloaded free compliers and IDE’s (Integrated Development Environment) and you can too! There are free editions of Visual Basic.Net, C#, C++ and SQL Server to get you going in your programming career. Next, put the effort into writing useful software or web applications. You will learn a lot about design, adding software features, taking requests from users, business analysis, project management, requirements analysis, coding and debugging that way. 

Do You Have What Companies Are Searching For?


So, you have prepared a resume, sent it over to hiring managers and are now getting ready for your technical interviews. Have you thought about what those employers are looking for? It’s essential to your programming career to be able to answer that question. In the programming job market, employers want to see that you can apply your skills to real business problems. They are looking for competent software development skills and to see if you can write good maintainable code. 

Learn a Top Paying Computer Programming Skill and Get a Tech Job Easily
In any job market, no matter what type of job you are trying to get, having knowledge and experience with a particular skill can get you a job relating to that skill. Programming is not any different, if you have working knowledge of programming and experience programming you can get a job programming. Knowledge of programming can be gained from many sources. College is the first source that comes to mind, but the alternatives are to learn programming on your own or from a subject matter expert. Now days, you can read up on just about anything on the internet and it’s free; but you should probably invest in many different programming books that go into more detail so you can advance your skill level. Programming experience doesn’t strictly have to be from a previous job you have had. You can gain experience working with software development tools or from hands on training.

How to Begin a Software Development Career after High School?


You can get a programming job without a college degree and here’s how. You will need to communicate your programming knowledge and development experience. Knowledge and experience is the key. Show your prospective employer that you have just as much knowledge as the guy who did go to college and go into the specifics about the applications you have built using software development tools. Talk about the problems you ran into when building an application and how you solved the problems. Do all that you can to show your prospective employer that even without a college degree you are an asset to anyone who hires you!

I encourage you to read the book "The Street Smart Guide to Computer Programmer Careers" http://www.becomeacomputerprogrammer.com/. It will show you how to learn programming fast, prepare your resume, prepare for technical job interviews and how to gain the experience that keeps your career moving forward

Author: Kingsley

How to Learn Programming!!

Programming is a very advanced computing skill that involves designing, debugging, and testing programs. Programmers create the backbone of every computer program available on the market today through lines and compilations of code. An expert computer programmer may make the job look easy, but it can be quite time-consuming and even frustrating at times to come up with a program that works without a hitch. Whether it's basic programming or advanced coding and compilation, programming skills are essential if you want to keep up with the fast pace of computer technology.


Learn a Programming Language

All programs are designed and built with a programming language. Many programmers are skilled with multiple language, although it helps to focus your knowledge and skills on one or two specific programming languages. Here are some of the most common programming languages you should learn:

BASIC is one of the oldest high-level programming languages available today. BASIC is somewhat complicated, although it is commonly used to introduce beginners to essential skills in programming. 
C++ is an upgraded, easy-to-use version of C. C++, also known as "C with Classes," was developed to compensate for the difficulty and relatively slow speed of the original C code. 
Java is a very common object-oriented programming language for the World Wide Web. Java has the advantage of being one of the few languages that can turn out programs that can run on any computer anywhere in the world. 
Pascal is a mathematics-oriented programming language used in many fields like engineering and education. While Pascal has fallen out of favor for many programmers, Pascal is a very influential programming language where many concepts for today's programming languages are derived from. 
Perl is a high-level programming language specifically designed for Web applications and the handling of text-based files and compilations of code. Perl is considered one of the most flexible and adaptable programming languages in the world today. 
Visual Basic is one of the most common programming languages, and is very easy to learn. Visual Basic makes it easier to write programs and compile code because of its graphical user interface.

Brush Up on Mathematics

When learning how to program, it's very important for you to brush up on advanced mathematical skills and concepts. A lot about computer programming involves relationships with certain elements of code, which involves a lot of mathematical modeling. Most computer programming degrees incorporate fields like mathematical analysis and calculus into the curriculum.

Buy or Build a Powerful Computer

Entry-level computers do not have the power and performance necessary for programming. While expert programmers can create programs on low-end computers, it takes a very long time to compile and test the code on a slow machine. If you're serious about pursuing computer programming, you need to invest in a powerful desktop or laptop that can fit the high-end demands of the most powerful and complex programming languages out there.

Read Programming Books and Manuals

Books and manuals provide step-by-step instructions for beginners and advanced programmers alike to get around the technical aspects of computer programming. For you to be able to learn programming well, you have to buy or borrow books about the specific programming language you're using. You can also download convenient manuals and books in PDF from the Internet, if you're more comfortable with them. The "Help" file of a computer programming language does not contain the information you need to learn everything about the language, outside of books and manuals.

Study Code

Another way to learn programming is to study codes from good programs and sample tutorial codes from the Internet. Like any other language, you learn programming by doing. Take the time to read and analyze good examples of computer code, and understand the relationships between all the elements of the code. Follow the examples set by the sample code to get your practice programs and actual programs running perfectly.

Programming may seem complicated, but with enough practice and knowledge, it becomes simpler for every line of code. With these tips to help you get started in the world of programming, a few lines of code can be the start of a great new program.


by Monster Guide

Introductory guide to Pointers in C

1. Introduction

C is a very powerful programming language that are used by many software developers to develop different kinds of software. However, for a beginner, C is a rather difficult language to grasp. Much of the difficulties in learning C comes from the confusion over the concept of pointers. In this article, I shall explain the concept of pointers with the help of some code snippets. 


2. Pointers, Addresses and Variables 

A pointer is a variable that holds a memory address.

It is important to differentiate between a pointer, the address that the pointer holds, and the value at the address held by the pointer. This is the source of much of the confusion about pointers. We will illustrate this in the following code snippets:

int nVariable = 5; int *pPointer = &nVariable; 

The first statement declares a variable "nVariable" of type integer and assigns a value 5 to it.

The second statement declares a pointer variable that holds the address of an integer, and assigns the address of the variable "nVariable" to it.

So let just imagine the memory is a set of lockers. Each of these lockers has a locker number assigned to it for identification purposes. The first statement will do something like reserving the locker number "1234", and put the value "5" into this locker. The second statement will do something like reserving the locker number "4321", and then put the value "1234" into the locker. So the locker number "4321" is actually storing the locker number of the locker that stores the value "5".


3. Indirection

The term "Indirection" refers to the method of accessing the value at the address held by a pointer.

The indirection operator (*) is also called the dereference operator. The following code snippets in C++ shall illustrate this method:

int nVariable = 5; int *pPointer = &nVariable; printf("The output is %d", *pPointer);

The output of the code snippets will be the number "5". Remember that "pPointer" is a pointer variable that holds the address of the variable "nVariable". Notice that we use "*pPointer" to assess the value hold by the variable "nVariable", and this is what we call "Indirection".


4. Conclusion

This article aims to provide a simple guide to understanding the concept of pointers, addresses and variables in C. Readers are assumed to have some basic knowledge in C.

by Dennis Chang

Why do you need to cast a variable?

In a general computer programming scenario, there are many data types on the basis of the kind of data they store and the overall visibility of the variables throughout the program modules. Accordingly, there are multiple data types viz. integers, long integers, doubles, strings, characters, as well as variables that are constant, private, friend and global variables. Each data type has its own particular memory requirement, which naturally varies depending upon the nature of values it stores and the domain of its visibility.


In any typical web development project in India, it is but natural for Indian developers to pay attention to the judicious use of memory and achieve optimum efficiency at it. The objective is to use minimum memory.


Also, during web development in India, software professionals need to write stored procedures and SQL queries that need to have variable value in a specific data type only to be run successfully. As a result, programmers use Cast and Convert functions to achieve conversion between data types.


While casting a variable and converting a variable sort of achieves the same result, casting has wider applicability and use than convert. While convert function is limited to SQL, Casting variables pertains to ANSI standard and can be incorporated across various databases, extending more flexibility to the programmers during web and software development.


In fact, casting a variable is a typical feature in most computer programming languages wherein a particular type of variable is reassigned a new variable type so as to facilitate a typical programming situation. As and when a developer implements the feature of casting a variable during web & software development, it is told to the computer to use a different type of variable to store the value of the variable. For example, a software developer may encounter a situation during web and software development; where in a short integer must store a decimal value. Under the circumstances, the programmer would cast the short integer into a long integer data type or a double data type to be able to store values larger than +32,767.

Blog Widget by LinkWithin