Files In C Programming Examples Pdf

Where can I get C Programming Interview Questions and Answers (objective type, multiple choice)? Here you can find objective type C Programming questions and answers for interview and entrance examination. It refers to a sequence of bytes. So, the file name prog1. This routine is precisely the same as FLASH1. How will the program read the file? scan?. In output operations, data. If the file doesn’t exist then this program will create a file with the specified name and writes the input character into the file. If you had a program called hello. Manipulate PDF Files On the Fly. How to convert PDF to Excel using R; C/C++. A CGI program can be written in any programming language, but Perl is one of the most popular, and for this book, Perl is the language we’ll be using. Go by Example is a hands-on introduction to Go using annotated example programs. ZIP 7K MicroSoft C AT6400 Communication Driver Example Code (6. txt created in C drive of your computer. Each virus cell reproduces itself at some time interval. This library allows you to extract pages, insert pages at a particular location in a PDF file or create N-up's (number of pages over single page) and booklets. C, and so on). This book is the oldest and most trusted book for the students of programming which got its first edition in 1978. In this page you will find a lot of C# exercises to help you test your knowledge and skill of writing code in C# and practice the C# programming lessons. Step 2: Print the PDF file with the default printer to print all the pages. We can automate an Excel file from C# in two ways. The following example shows how to write the program to incorporate multiple components in the design of a more complex circuit. For Functions you need steps 1-3: Step 1: At the beginning of your program you need to declare any functions: function type function name (types of parameter list); example 1: double feetinchtometer (int,double); example 2: void metertofeetinch (double, int&, double&);. While the C# programming language is used to highlight and demonstrate the application of fundamental object oriented principles and modelling techniques this book is not an introduction to C# programming. If the text file is specified as “-“, the converted text is sent to stdout, which means the text is displayed in the Terminal window and not saved to a file. Author(s): Michigan State University. Create the following three files on your system using your preferred text editor: hellomake. exe" ‐‐sdi(including the quotes exactly as shown, and assuming that you've installed R to the default location). Sockets Programming in C using TCP/IP Professor: Panagiota Fatourou similar to file I/O Some common examples of TCP and UDP with their default ports:. It takes a file argument, and the append argument allows a text file to be written via successive calls tocat. Individual subscribers to Numerical Recipes Electronic who also own the book, can now convert their subscriptions to "lifetime" subscriptions. The present document does not contain any C++ technical recommendations at all, but focuses mainly on programming style. Tip You can set as many breakpoints as you want, and the program should stop execution if it reaches any of them. prn in Adobe Reader. Its generic name is "S19 file'. , an open may fail if we don't have the correct permissions or the file doesn't exist when opening for reading). Imp rove consistency and ease-of-use Publicly Available Op erations: {Op en and close a le fo r reading and/o. This assumes that you have already designed the program and defined it using the steps above 1. The Workspace window organizes the files in your project in an easy to see hierarchy. else Statement Example Program In C++; If Else Ladder Example Program; Simple Switch Statement Example Program In C++; For Loop Example Program. The previous program is the typical program that programmer apprentices write for the first time, and its result is the printing on screen of the "Hello World!" sentence. Visual C++ offers many new features and improvements over its predecessor, Visual C++ 5. To use the code, you should first place a text file in the same directory as your application, or create one using a text editor such as Notepad or Vi. In that case, the best practice is to use the same name for the function and the file (in this example, fact. c in the example below), and (2) tell the compiler to link in the code from the library. Mathcad Keyboard Shortcuts Action Example Keystroke Mathcad Help [F1] Context sensitive Help [Shift] [F1] Calculate worksheet [Ctrl] [F9] Calculate region [F9] Redefinition warnings (toggle on and off) [Ctrl] [Shift] R Insert text region ["] Insert math within text region [Ctrl] [Shift] A Addition with line break operator (within a math region). Some of the source files are additional material, most represent complete programs described in the book. com It is this file (command. functions A function is a set of commands. We emphasize solving problems using the language, and introduce standard programming techniques like alternation, iteration and recursion. Programming in C Bharat Kinariwala Tep Dobry University of Hawai`i at Manoa Tableofcontents. Pdf995 makes it easy and affordable to create professional-quality documents in the popular PDF file format. No annoying ads, no download limits, enjoy it and don't forget to bookmark and share the love!. Text is available under the Creative Commons Attribution-ShareAlike License. variable = expression. MDI Example – I With no documents open, after initialization, the Parent Form menu contains only , & , while after the first new child document occurs it changes with and menu items. Tech With Tim 182,131 views. The function is called WriteComPort and it contains two parameters. The last index is one less than the size of the arr. Navigational Interface Example; LOB Program Examples. In order to access the sample codes from ppt or pdf, make sure you put all the source code files under same folder as. C++ exercises will help you test your knowledge and skill of programming in C++ and practice the C++ programming language concepts. An expert at a particular program, or one who frequently does work using it or on it; as in 'a Unix hacker'. D New Zealand eScience Infrastructure 1 INTRODUCTION: PYTHON IS SLOW 1. When compiling the program, you will also need to add -lpthread to the compile command. pdf; Chapter2. How to print PDF files in C#. csv,go,directory,folder. header files contain prototypes for functions you define in a. How to create a C project with multiple source files Hi All, Just thought an example would be beneficial. class) I/O Example with Reading and Writing from or to the File import java. For example: COPY file1 + file2 file3 would copy file1 and file2 into file3. This is an example of performing file processing in C++. Open File With Associated Application [C#] This example demonstrates how to open file with an associated program. com Document Ver 1. A complete list of functions available for use in Trading Strategies with syntax, descriptions, and examples can be found in the WealthScript QuickRef (Tools menu, or. Like opening the program with a passed in text file from a command line. CSc 231 Python, Spring, 2018. to a PDF and then displays. The aim of this book is to convey some of the C philosophy in a prac-tical way and to provide a comprehensive introduction to the language by appealing to a number of examples and by sticking to a strict structuring scheme. I'm trying to figure out whether to install programs in Program Files or Program Files (x86). C++ Shell, 2014-2015. Here you can learn more than 100 C++ programming examples here, c++ programs, c++ programs list, c++ examples with explanation and outputs. The fastest way to get started with the GemBox. Our main mission is to help out programmers and coders, students and learners in general, with relevant resources and materials in the field of computer programming. Let's start by understanding what happens when we give a DOS command. string fruit[5]; // an array of 5 C++ strings The element type of an array is often called its aseb type. Dynamic programming is a very powerful algorithmic paradigm in which a problem is solved by identifying a collection of subproblems and tackling them one by one, smallest rst, using the answers to small problems to help gure out larger ones, until the whole lot of them is solved. Summary of basic C++-commands Compiling To compile a C++-program, you can use either g++or c++. with Hello World JSF Example to the bin path of the installed jdk, for example “C:/Program Files/Java/jdk1. 0/0 i and j i = j = square root of -1 realmin The smallest usable positive real number. The most important thing was the number of methods and properties available to me to be able to manipulate PDF files in the ways that I required. The remaining BASIC help topics describe what you can do with BASIC and provide simple examples to. introprogramming. c” file, there is an implicit command that will be “cc -c file. c might be a valid filename for a C program. A program proposal is a written document containing sequences of activities in a program. It is used to pitch a program idea to prospective clients and agencies. The filename of my PDF is "example. This article introduces RE/ flex for C++. So, they are suitable for any user (dummies, beginners or advanced users). Practical C++ Programming Teacher's Guide Introduction This guide is designed to help with the classroom presentation of the material in Pracctical C++ Programming. The aim of this book is to convey some of the C philosophy in a prac-tical way and to provide a comprehensive introduction to the language by appealing to a number of examples and by sticking to a strict structuring scheme. File, System. This is a C programming tutorial for the MySQL database. py # Purpose: Example: 'sentinel-controlled' while loop # Calculates average score of a class # Programmer: Anne Dawson # Course: CSCI120A, CSCI165 # Date: Tuesday 5th October 2004, 6:31 PT # initialization phase totalScore = 0 # sum of scores numberScores = 0 # number of scores entered # processing phase score = input( "Enter. txt" as file name, then click "Save". A Pro*C program is compiled in two steps. To read a file in C++ programming, you have to first open that file using the function open() and then start reading the file's content as shown here in the following program. py -o example. This C program would print the following: TechOnTheNet. Getting started 3. The program should continue along one of two routes. Its easy-to-use interface helps you to create PDF files by simply selecting the "print" command from any application, creating documents which can be viewed on any computer with a PDF viewer. File organization sol→ cd incompressible→ cd icoFoam • The icoFoamdirectory consists of what follows (type ls): createFields. Individual subscribers to Numerical Recipes Electronic who also own the book, can now convert their subscriptions to "lifetime" subscriptions. I Author Florence Tiu Balagtas Team Joyce Avestro Florence Balagtas Rommel Feria Reginald Hutcherson Rebecca Ong John Paul Petines Sang Shin Raghavan Srinivas. NET, Microsoft Visual Studio 2005, or Microsoft Visual C++ 2005 Express Edition. Example Programs Find and submit example programs for LabVIEW, LabWindows/CVI, Measurement Studio, and other NI software environments. Examples might be simplified to improve reading and basic understanding. Traditionally first example will be a simple application that prints “Hello World” text on its output. c used in the example for writing standalone applications. That means, a socket program written in Java language can communicate to a program written in non-Java (say C or C++) socket program. Code Examples. This tutorial assumes that you know how to edit a text file and how to write. C Program to read characters from a file. The name comes from the first letter of PDF (Portable Document Format). If you are familiar with the C language, you can take the first 3 parts of this tutorial as a review of concepts, since they mainly explain the C part of C++. Embedding Type1 font and TrueType font. The fastest way to get started with the GemBox. c -o executable C++ syntax is as follows if the source code is in several files: g++ ac. A Delegate is simply a command that IM knows that will allow it to convert between different formats. example, in C, you can group related variables and functions in a single file, making some invisible to functions in other files by labeling them as static. By tradition, C source code files have the extension. Pdf component. C also allows programmers to define their own functions for carrying out various individual tasks. Learning MIPS & SPIM • MIPS assembly is a low-level programming language • The best way to learn any programming language is to write code • We will get you started by going through a few example programs and explaining the key concepts • Tip: Start by copying existing programs and modifying them. To read a file in C++ programming, you have to first open that file using the function open() and then start reading the file's content as shown here in the following program. 2 Header Files. A clear, example-driven presentation of objects, classes, inheritance and polymorphism. Programming in C Lectures. Programs are structure with outset in the data. of the mouse (or sequence of shortcut keys); to save a file click File!Save. Simple Echo Server and Client. I think you can then use some search to locate the text you want. 6 October 08, 2002. The "Step-by-Step Example" section describes how to create a sample program that demonstrates the following six file I/O operations: Read a Text File; Write a Text File; View File Information; List Disk Drives. A slightly more interesting example, and one that introduces some additional C programming concepts, is provided on the page How to Create a Second C Program on Linux. A complete program that includes the example described below, plus an input file to use with that program, is available to download. Program Flow Using Free Format In nearly every program you write, you need to control the flow of instructions. C programs with output illustrate various programming concepts - operators, loops, functions, single and double dimensional arrays, performing operations on strings, files, pointers, etc. Moreover. If you want clear. The following example shows how to write the program to incorporate multiple components in the design of a more complex circuit. When a program is executed, the objects interact by sending messages to one another. Remember: software files in NXT filesystem have the same name as source NXC file. declare pointer to type type *name declare function returning pointer to type type *f() declare pointer to function returning type type (*pf)() generic pointer type void * null pointer NULL object pointed to by pointer *pointer address of object name &name array name[dim] multi-dim array name[ dim1][ 2] : Structures struct tag { structure template. exe "%1" ASSOC. o rule; the implicit rule will not run! # 2) If there is no blah. out source lename. since the original-file parameter can be a list of filenames separated by the + symbol. But in the software industry, most of the programs are written to store the information fetched from the program. Convert Excel File to PDF in Java Example Until now, we have been discussing in length on converting MS Excel documents to CSV files in Java. Please note that Java is case-sensitive. Progressing from the original source code to a running program is a two-step process. c files) are first passed to the C preprocessor, CPP. cc source file (here, student1. It is hoped that this will give a flavour of the kind of programming which C encourages. (gdb) break file1. ) Function cat underlies the functions for exporting data. o" # Note: 1) Do not put a comment inside of the blah. Some of the source files are additional material, most represent complete programs described in the book. You want to place #ifndef/#defines around your. Edit the Targetfield on the Shortcuttab to read "C:\Program Files\R\R‐2. Is it good practice to include \*nothing\* in my. Aalso downloads on Code with C are free, instant and easy. If you will benefit from this example, then. First, download the contents of this repository onto your hard-drive. programming techniques differ significantly from the sequential programming used in C programming language. C programs with output illustrate various programming concepts - operators, loops, functions, single and double dimensional arrays, performing operations on strings, files, pointers, etc. C++ Programming 5th Edition Ds Malik Solution Manual Pdf C++ Programming 5th Edition by D. Creating a C++ Project using the Eclipse CDT Plugin: This section describes how to create a C/C++ project in Eclipse using the CDT plugin. •• Each function must contain: -- A function heading , which consists of the function name ,,. Atari downloads Neo-Geo x box emulation. In this example, we are going to explain how to convert an Excel document (Office 97 – 2003 format) to PDF file in Java. You can cut and paste the code above into a file, save it as a. For example, let's say you have a 10-page PDF file that you want to split, with the first 7 pages in one file and the last 3 in another. I hope that the code is understandable. Users of the IBM i Information Center must first read and agree with the terms and conditions for downloading and printing publications. Tip You can set as many breakpoints as you want, and the program should stop execution if it reaches any of them. Argument 1: The first argument to GetFiles is the directory path. Press J to jump to the feed. Using this Word to PDF converting library control,. Common file format are object file format (COFF) or the extended linker format (ELF). zip is available in many operating systems like unix, linux, windows. FileInfo, and System. h 8) Which pair of functions below are used for single xharacter I/O ? Which of the following. Learn programming in C language in 7 easy lessons. It includes routines for data summary and exploration, graphical presentation and data modelling. Course CPP101 Introduction to C++ Programming. Here are examples of opening. Text is available under the Creative Commons Attribution-ShareAlike License. In the Save As dialog box, enter "Hello_World. exists(), delete the file from the card with SD. We have collected the List of Frequently asked questions (FAQ code examples) in C++ programming. @vy32 Looking at the source I would say generating pdf-files is. Subscribe to view the full document. • This logic consists of instructions that are programmed in a ladder logic. •A computer program is an algorithm written in a in a programming language that executes a certain task. For example, a) An Operating System understands program image format in order to create a process. Above is just for example only. The C language is similar to most modern programming languages in that it allows the use of functions, self contained "modules" of code that take inputs, do a computation, and produce outputs. But in the software industry, most of the programs are written to store the information fetched from the program. Any type of program can be written with FreeBASIC, see our Gallery of Applications for some notable examples. c to read contents of a structure array. Each file is stored in single. As you may already know that to develop programs you need a text editor and a compiler to translate a source program into machine code which can be executed directly on a machine. We will use. The input mode flags in c_iflag handle all input processing, which means that the characters sent from the device can be processed before they are read with read. void Delay(void) { TMOD = 0x01; TL0 = 0x47; TH0 = 0xFF; TR0 = 1; while(!TF0) TR0 = 0; TF0 = 0; } Example 4 Program to toggle pin 7 on Port 1 with a time delay of 20 ms. No annoying ads, no download limits, enjoy it and don't forget to bookmark and share the love!. The program uses the get and continues to read until eof is reached. And they are not much more difficult than hello. The name of the program has to be similar to the filename. C ++ Programming by DS Malik's 5h edition Solution. C++ Shell, 2014-2015. Create PdfStamper instance. MATLAB PROGRAM EXAMPLE Matlab Program Example helps you to learn Matlab programming along with Matlab programs. Tip You can set as many breakpoints as you want, and the program should stop execution if it reaches any of them. 00 • C2000Ware 1. c" contains the following data "Hai, How are you?". A text editor should be in place to start your C++ programming. You can choose when to do something in an object-oriented way (define a new class, for example) and when to stick to procedural programming techniques (define a structure and some functions instead of a class). You can create detailed and immersive simulations like The Sims. (j) When you are ready to run your program, continue with step 7. For example, MYWORDS. l bash% ls lex. cdt-win32_1. What exactly is a kernel module? Modules are pieces of code that can be loaded and unloaded into the kernel upon demand. A simple example to understand how to access the address of a variable without pointers? In this program, we have a variable num of int. ,Indianapolis,Indiana 4620 USA4 Object-Oriented Programming in C++, Fourth Edition 00 3087 FM 11/29/01 2:15 PM Page i. Write members of arrays to a file using fwrite() 1. MPLAB can also work with C and other programming languages. This type of function must be defined within a file, not at the command line. Robert Lafore 800 East 96th St. When you open the file, you can see the integer you entered. Stallman, Roland McGrath, Andrew Oram, and Ulrich Drepper for version 2. F and describe its contents. bash% lex shell. -- The program will always begin by executing the main function. g++ -oexecutable lename. Read File Program in C++. And the function getch () (of conio. txt, spam002. Sockets Programming in C using TCP/IP Professor: Panagiota Fatourou similar to file I/O Some common examples of TCP and UDP with their default ports:. Its extension is. It was initially developed by Dennis Ritchie as a system programming language to write operating system. Socket programming examples in C++. NET, Microsoft Visual Studio 2005, or Microsoft Visual C++ 2005 Express Edition. This is primarily a class in the C programming language, and introduces the student to data structure design and implementation. The intent of this article is to give you a very basic introduction to C programming on the Raspberry Pi. Pdf library is by exploring our collection of C# and VB. Pdf995 makes it easy and affordable to create professional-quality documents in the popular PDF file format. The books cover all major programming languages: Ada, Assembly, Basic, C, C#. C program based on matcreat. This program asks the user to enter a character and writes that character at the end of the file. Without much effort, pandas supports output to CSV, Excel, HTML, json and more. Two example programs are given that diplay the state of the toggle switches on the red LEDs. pdf; Chapter3. 5% the size of the Census Bureau’s VPLX package (which does less). For example, for Acrobat DC this folder is located in C:\Program Files (x86)\Adobe\Acrobat 2017\Acrobat\JavaScripts\. It refers to a sequence of bytes. void Delay(void) { TMOD = 0x01; TL0 = 0x47; TH0 = 0xFF; TR0 = 1; while(!TF0) TR0 = 0; TF0 = 0; } Example 4 Program to toggle pin 7 on Port 1 with a time delay of 20 ms. ) c) Usually the Operating System understands and interprets file types. In C++ file input output facilities implemented through fstream. FreeBASIC can be seen to extend the capabilities of Microsoft QuickBASIC in a number of ways, supporting more data types, language constructs, programming styles, and modern platforms and APIs. The first thing we must understand is that the PDF file format specification is publicly available here and can be used by anyone interested in PDF file format. Pattern Printing in C Write C program to print the following pattern: 1 121 12321 1234321 12321 121 1 Program: #include void sequence(int x);. example, if your input is 10, the output should be:. II MSO1000Z/DS1000Z Programming Guide Document Overview This manual provides guidance on how to use the SCPI commands in programming to realize remote control of RIGOL MSO1000Z/DS1000Z series digital oscilloscope through the remote interface. All examples are compiled and tested on a Linux system. However, a little practice with it provides an excellent foundation for writing longer programs that actually do something useful. edu requests the TCP client to. This example created for to read an excel file with C# Console Application. C/C++ Programming Books Visual C++ 6 Unleashed Visual C++ 6 Unleashed provides comprehensive coverage of the core topics for Visual C++ 6 programming. It is part of the System. PROGRAM TRANSLATORS As we have seen in other chapters, a computer can only understand programs defined using machine code. The curriculum vitae, also known as a CV or vita, is a comprehensive statement of your educational background, teaching, and research experience. Here i am looking for printing the existing PDF file through C# code and not creating new PDF(or writing new content inside PDF) Hi I have a PDF file stored at a file location say at C:\\MyPDFFile. IO namespace. C program to copy the contents of one file into another using fputc: 2: C Program to read last n characters from the file ! 3: C program to convert the file contents in Upper-case & Write Contents in a output file: 4: C Program to Compare two text/data files in C Programming: 5: C Program to Write on Data File and Read From Data File: 6. oA similar function drand48() returns double precision numbers in the range [0. Argument 1: The first argument to GetFiles is the directory path. dep Make/ • The FoamXdirectory is for pre-processing. • The Makedirectory contains instructions for the wmakecompilation command. If you are creating a project using Java files that are already stored in a folder for you (for example, the folder is named MySecondProgram): (a) IMPORTANT: Make sure the folder with the Java files is stored inside your MyWorkspace folder before you go on to the following steps. It features more extensive examples and an introduction to graphical. We have collected the List of Frequently asked questions (FAQ code examples) in C++ programming. Topics to be covered •Introduction to Programming in C & Restricted Exposure to Linux - Today •Data, Operators, I/O - Tomorrow •Conditional Expressions, Control Flow –23rd Aug. Set the image watermark. R: A self-learn tutorial 1 Introduction R is a software language for carrying out complicated (and simple) statistical analyses. The last index is one less than the size of the arr. a program that will calculate how long it will take to send a file, given the file's size. This is a short tutorial on how to compile and run a simple OpenCV program using Microsoft Visual C++ 2015. Programming with CAPL CANalyzer CANoe. Its generic name is "S19 file'. Step-by-Step Programming with Base SAS Input File and SAS Data Set for Examples 188. Step 2 Compile the program using a compiler. High level code provides a way to generate easily readable code that can be easily ported across processors and instruction sets. You cannot name a file ^Example. If you had a program called hello. The thin book which for years was the bible for all C programmers. example, Notepad will be used on Windows and vim or vi can be used on windows as well as Linux, or UNIX. A text editor should be in place to start your C++ programming. C++ Programming Examples C plusplus Programming by DS Malik's 5th Edition Solution Manual. In Java, for example, you will use an actual language construct called a class definition to group variables and functions. Although output of this program is often clear and intuitive it's worth to spend some time to get deeper knowledge of how Valgrind works, what exactly its messages mean and what are the problematic cases when tracing a memory leak is harder even with. Copy Examples This C# article looks at the File. , flightsim. The content of the file will be different, but these three C example program should explain you how to use the c file functions like fopen, fprintf, etc. You could have many files open at the same time, so the file number lets QBASIC know which file you want to work with. Sort Taking the sorting example; let’s sort an array using the Bubble sort technique. r/programming: Computer Programming. The file usually has the same name as the class, with the. Balaguruswamy, 1995, Programming in ANSI C, TMH 2002, Programming with ANSI & Turbo C, First preview Download Ansi C Problem Solving And Programming -. Windows Programming with MFC MFC Programming? • Examples: - m_hWnd stores the window 's handle - Must be declared in. This is primarily a class in the C programming language, and introduces the student to data structure design and implementation. After opening the file, we should test the file object (e. LTS The following abbreviations are used: • C/C++ Header Files and Peripheral Examples refers to any of the header file or device support packages. e reader will be expected to. Technical support teams and other advisors can draw on the capacity statement and impact examples to identify best practices and inspire new program design. When you write a MySQL client program in C,you’ll need a C compiler,obviously. Now you can run your program. It filters the files in that directory and only displays the ones with the "BIN" extension. You can find the code for all the examples in these notes in the files accompanying the notes, under the relevant chapter. Initially, VoiceCode supported only the Python programming language. " In certain scenarios, it can be coded in either way and is thus an effective example of a hybrid language. Whether you've had any prior programming experience or not, the tutorials on this site will walk you through all the steps to write, compile, and debug your C++ programs, all with plenty of examples. The examples shown here use gcc,which is probably the most common compiler used on Unix. load Loads workspace variables from a file. Embedded SQL is a method of combining the computing power of a high-level language like C/C++ and the database manipulation capabilities of SQL. To distinguish C++ headers from C headers other extensions are sometimes used, such as. To create a PDF file from the TEXT file using Java. For example, in the Standard C runtime library, the family of functions that includes fopen(), fclose(), fread(), fwrite(), etc. CONTENTS v 11. Visual C++ 2005 or Visual C++. C++ GUI Programming with Qt 3 Jasmin Blanchette, Mark Summerfield Managing Linux Systems with Webmin: System Administration and Module Development Jamie Cameron Understanding the Linux Virtual Memory Manager Mel Gorman Implementing CIFS: The Common Internet File System Christopher Hertel Embedded Software Development with eCos Anthony Massa. In a text file, everything has to be converted back and forth to text, and this takes time. PDF I want to print this PDF file through C# codeAlso i want to show a Print Dialog with PrinterSettings(Printer Name, Paper Size, Paper. C language interview questions solution for freshers beginners placement tricky good pointers answers explanation operators data types arrays structures functions recursion preprocessors looping file handling strings switch case if else printf advance linux objective mcq faq online written test prime numbers Armstrong Fibonacci series factorial palindrome code programs examples on c++.