Home Tutorialhelp Comment Output given for example is wrong

 
 

Comment

H kumar
Output given for example is wrong,
June 10, 2009 at 2:18 PM

Output should be The value of 0=10
The value of 1=20
The value of 2=30
The value of 3=40
The value of 4=50
Or we can change the program at following line
printf("The value of array2[%d]=%d\n", j, array2[j]);

to get desire result.


View All Comments | View Tutorial
Advertisement
Related Tutorial and Articles
C++

C Tutorials
programming language. C Array copy example The example... will learn how to copy the string in C. You can see in the given example, two string...; In this section we have given large number of tutorials on C 

Blog

Site map - C Tutorials
| C String Copy | C Dynamic Array | C file delete example | C file... default values | C Array Declaration | C Array copy example Java Tutorial... | Array of String using Pointers | C break continue example | C Break 

Programming Tutorials

C++Tutorials
C," or as C with some add-ons. I believe that to be wrong, and I intend... other tutorials, such as C++: Annotations by Frank Brokken and Karel Kubat...; The CPlusPlus Language Tutorial These tutorials explain the C++ language 

C Tutorials

C String Copy
C String Copy       In this section, you will learn how to copy the string in C. You can see in the given example, two string variables st1 and st2 are created. A string 

Programming Tutorials

Array Implementation in C
Array Implementation in C Code: #include<stdio.h> #include<conio.h... for an array \n"); read(size,5); printf("All elements of the array are : \n"); display(size,5); } void read(int c[],int i) { int j 

C Tutorials

C Array copy example
C Array copy example       In this section, you will learn how to copy an array in C. The example... the size of an array states its capacity to hold maximum number of values.  

Programming Tutorials

Inverse of an array in C
(a,6); getch(); } void read(int c[],int i) { int j; printf("Enter six element for an array \n"); for(j=0;j<i;j++) scanf("%d",&c[j]); } void display(int d[],int i) { int j; printf 

Java-Tutorials

Copy char array into string
Description: This tutorial demonstrate how to convert char array into a string...) return and creates new array of string and copies the specified characters into it and the String.valueOf(charArray) copy the content of character 

Free C++ books

C/C++ Programming Books
; A Beginners C++  The table of contents given below includes links... C/C++ Programming Books         Visual C++ 6 Unleashed 

Programming Tutorials

JavaScript Copy Array
useful in complex applications. In this section, you will study how to copy an array. You can see in the given example, we have created an array object 'arr1... JavaScript Copy Array      

PHP Tutorial

copy() example
Copying a file in PHP In this example, you will learn 'how to copy a file in PHP programming language?' For copying a file, we use copy command from source to destination within PHP code tag like  copy ($source,$destination); Lets 

Programming Tutorials

Sum of array element in C
of the array is %d\n",sum); getch(); } void read(int c[],int i) { int j; for(j=0;j<i;j++) scanf("%d",&c[j]); fflush...(); printf("Enter five elements for an array \n"); read(a,5 

Design concepts & design patterns Questions

C++
C++  Trace the bubble sort using the following integers,which represent the elements in an array. 5,7,3,8,6,7,3 

Java Beginners

C++
C++  Describe the principle advantages of deploying a linked list versus a static array when implementing a Queue or a Stack 

Development process Questions

c++
c++  use a prgrm as an example to xplain-: a)class b)object c)message d)cope resolution operator 

JSP Tutorials

<c: out> For Simple Calculation and Output
<c: out> For Simple Calculation and Output  ... of the program is given below: Download this example.  ... purpose core library tag is <c: out>. The main function of the this tag 

Java-Tutorials

Java Multi Dimensions Array - Java Tutorials
that array is the set of same type of data stored under the same roof. Given below the example to provide you an idea-how array works? Declaring one...; // This will print 4th element of array. Example : public class DevArray { public 

JSP Tutorials

JSP JSTL c:if tag
it is skipped. In the given example, we prompt the user to guess the word. If he...="${param.guess!='roseindia'}">You are wrong! </c:if> </c:if>... is wrong, output will be: Download Source Code 

CVS Questions

c++
c++  Write a console based C++ program that reads student information from a text file, build an array of objects of type class StudentInfo... name with the minimum GPA 7) Display Student GPAs as Letter Grades (A, B, C, D 

iPhone

Objective C Array
Objective C Array In a simple term we can say that array is a object, which... and remove the objects from the given list of array if the array is declared mutable. Syntax to declare an Array in Objective C: NSArray *myArray 

UML Questions

c++
c++  Write the definition of the class dayType that implements... on an object of type dayType: a. Set the day. b. Print the day. c. Return the day... the day by adding certain days to the current day. For example, if the current day 

Java Beginners

C/C++ QUESTIONS
C/C++ QUESTIONS  "Write a function for finding out highest and lowest marks obtained by a student from an array contained student name and marks". For Example : GetHighestLowestMarks{Student{n}, Marks{n}} returns 

Java Beginners

c++
c++   Assume vector "x" of integers with values of 7, 3, 5, 8, 1, 9... that the value of "y" is sent to the standard output stream via the stream... output device 

Programming Tutorials

Merge of two arrays in C
mergelist(int *,int *,int *,int); int a[5],b[5],c[10]; clrscr(); printf("Enter the elements for the first array \n"); read(a,5); printf("The elements of first array are : \n"); display(a,5); printf(" 

iPhone

Objective C
Objective C tutorials. We will be explaining the programming language with easy to learn examples. You will find these Objective C tutorials very useful... World Example In this section I will show you how to develop Objective C 

C Tutorials

C Array of String
C Array of String       In this section you will learn how to create an array of string in C... and handled like a 2d(two dimensional) arrays. You can see in the given example that we 

Development process Questions

C,C++
C,C++  Sir, 100&30 gives output 4 in C++ and 100|30 gives output 116 How & and | gives output 4 and 116 

C Tutorials

C Array Declaration
C Array Declaration       In this section, you will learn how to declare an array in C. To declare an array in C, you have to specify the name of the data type and the number 

C Tutorials

C Dynamic Array
C Dynamic Array      ... of a dynamic array in C. The dynamic array is an array data structure which can....  You can see in the given example that we prompt the user to enter 

Development process Questions

C,C++
C,C++  int i=100,j=20; int c=i&j; int r=i|j; printf("%d",c); printf...(){ int i=100,j=20; int c=i&j; int r=i|j; printf("%d",c); printf("%d",r); getch(); } The above code displays the output: 4116   Sir how i& 

C Tutorials

C array sort example
C array sort example       In this section, you will learn how to sort an array in C. For sorting an array, we have used the qsort function. This function provides 

IoC Questions

Array in C
Array in C  Respected Sir, How can an array be an lvalue, if we can't assign to it? How can I set an array's size at run time? How can I avoid fixed-sized arrays? help me sir 

Java Beginners

c programming
c programming  Write a Program in 'C' to print the following output 'n' rows. for example, if n:3, the following should be output by the program : 1 1 2 L r 2 3 2 1 1 2 L 1 

Java Beginners

c programming
c programming  Write a Program in 'C' to print the following output 'n' rows. for example, if n:3, the following should be output by the program : 1 1 2 L r 2 3 2 1 1 2 L 1 

C Tutorials

C Array length example
C Array length example     ... of an array in C. An array is a contiguous group of data items with the same name and data type. In order to get the length of an array, we have used the sizeof operator 

Mobile Applications Questions

copy string to string objective c
copy string to string objective c  How to copy a value of NSString to another string in Objective C? I have to different views and i am will to show the NSString value in both of them. Thanks 

Java Beginners

C language
C language  i want that when i hit any key only * to be print not the hit key in c language   The given example will display aestricks on hitting any key. #include "stdio.h" #include "conio.h" #include "ctype.h" int 

HTML Questions

based on C#
C# Alert message  1) Write the related code for the following Form based on the Criteria given below: a) When user will not enter Employee Name... registration form If user fails to enter for example User Name then the Message box 

IDE Questions

c programme
c programme  When we drop a ball on a rigid surface it bounces from... of restitution. This coefficient is different for different types of balls. For example... a program in C that where the user will input an initial height(in metres) and also 

JSP Tutorials

<c: out> in JSTL
. The code of the example is given below:   <%@ taglib... is given below: Download this example.  ...<c: out> in JSTL       

C Tutorials

C Structure example
C Structure example       This section illustrates you the concept of structure in C. Structures... by the structure type name. In the given example, a small structure i.e struct is created 

C Tutorials

C Array default values
C Array default values     ... in Array. The example below contains an array arr of integer type. The maximum size of the array is 4. We have allocated only two values in the array like this:   

Core Java

How to copy a file in java
. In another way we can copy using File I/o Stream. Example:  Java Code to copy...How to copy a file in java In this section you will learn about how to copy... direct way to copy a  file.  What we can do is, read a content of one 

JSP-Tutorials

<c:If> with No Body
is given below:     <%@ taglib prefix="c" uri="http...; </html> The output of the program is given below...<c:If> with No Body       

JSTL

Using tag <c:redirect> of Core JSTL tags
Using tag <c:redirect> of Core JSTL tags       In this example we have used Core JSTL tag <c:redirect> that is used to redirect the page to given url, here 

Programming Tutorials

Jstl c:when,c:choose,c:otherwise tag in jsp
; </c:choose> EXAMPLE : Given below example, which checks whether...JSTL c:when,c:choose,c:otherwise TAGS IN JSP In this Section, we will discuss about how to use JSTL tag ' c:when ' in JSP with a simple example 

JSP Tutorials

<c: out> attribute default
of the example is given below: <%@ taglib uri="http://java.sun.com... is given below: Download this example...<c: out> attribute default    

Programming Tutorials

Addition of two arrays element in C
*,int * ,int); int a[5],b[5],c[5],i; clrscr(); printf("Enter the elements for first array \n"); read(a,5); printf("Enter the elements for second array \n"); read(b,5); addarray(a,b,c,i); printf(" 

C Tutorials

C array of pointers
C array of pointers       In this section, you will learn how to create array of pointers... variable. Then specify the name of variable. You can see in the given example 

C# Tutorial

bsearch() function in C
bsearch() function in C. This searches function the given key in the array...; %c is in the Array\n", *p);       ...; printf(" %c is not in the Array\n");     

Java Beginners

variable declaration in c and c++
variable declaration in c and c++  Comparison and an example of variable declaration in C and C 

Java-Tutorials

Java array copy example
Java array copy example In this section we will discuss about the arrayCopy... to the given position into the destination array. This method copies the element... an specified length of source array beginning from the given position can 

JSP Tutorials

<c: out> attribute escapeXml
;/body> </html> The output of the program is given...<c: out> attribute escapeXml   ... library tag is <c: out>. The main function of the this tag is to display 

Tutorials

NSString in objective c
NSString in objective c In this series of Iphone application development tutorials, we going to introduce you with some of the iphone basic classes and objects...that are used in objective C. NSString is one of them. Brief Introduction 

C Tutorials

C String Substring
in C. You can see in the given example, a string and a method substring... C String Substring      ...(); } Output will be displayed as: SUBSTRIN.EXE Download Source Code 

Programming Tutorials

Jstl c:if tag in jsp
tag ' c:if ' in JSP with a simple example. The "c:if" tag...;BLOCK  </c:if> for example : <c:if test="${param.guess=='...;test" attribute of JSTL "c:if" tag ,have the condition block. EXAMPLE 

Java Beginners

C/C++ QUESTIONS
C/C++ QUESTIONS  ??Write a function for finding out the occurences of repeated word from a sentence. This function would return an array of duplicate words. 

Java-Tutorials

input output
for data is written into byte array. This is implement in output stream...: This example illustrates how to copy contents from one file to another file. This topic is related to the I/O (input/output) of java.io package. In this example 

C Tutorials

C Structure Pointer
C Structure Pointer       This section illustrates you the concept of Structure Pointer in C. You can see in the given example, we want to access the employee's information 

C Tutorials

C file delete example
C file delete example       This section illustrates you to delete a file in C. You can see in the given example that we want to remove the file HELLO.txt. For this, we have 

Java Technology Tutorials

Java Example Codes and Tutorials
Java Tutorials - Java Example Codes and Tutorials Java is great programming... Java conversion tutorials with example.  ... Java String tutorials with example.   

Framework Questions

c postfix - Framework
://www.roseindia.net/c-tutorials/index.shtml Thanks...c postfix  q: write a c program to read apostfix expression store it in array of character then evaluate this expression using eval and get_token 

C Tutorials

C String length
in C. You can see in the given example, we have declared a string and initialize... C String length      ....", str, i);   getch(); } Output 

JSP Tutorials

<c:forTokens>
; The output of the program is given below: Download this example...<c:forTokens>          <c:forTokens items="${requestScope.tokenising 

General

C Tutorials
 

iPhone

Dynamic Types in Objective-C
Dynamic Types in Objective-C       Objective-C provides many methods to work... is of the given class or not, given method is member of the given class or not etc. Table 

Hibernate Questions

C++ question 3
.   C sum of two matrices The given code allow the user to enter...C++ question - add the two matrices and display the elements of resultant...; #include <conio.h> void main() { int m, n, c, d, first[10][10], second[10 

C Tutorials

C String Concatenation
in C. You can see in the given example, we have declared two strings in order... C String Concatenation     ...; } Output will be displayed as: STRINGCO.EXE Download Source Code 

C Tutorials

C Pointer to a function
can see in the given example, we have create a function mul to find the product... C Pointer to a function   ...; function in C. C provides a special feature of  pointer to a function 

Mobile Applications Questions

retain count in Objective C
retain count in Objective C  what is the retain count in Objective C?   retainCount in Objective c retainCount: retain count method is used to show the internal count of the given object so that programmer can easily 

Java Beginners

malloc in c example program
malloc in c example program  What is malloc in c? Please explain the term using an example in C program. Thanks 

Mobile Applications Questions

Array Initialization in obj C
Array Initialization in obj C  how can we initialize array in objective with some object ??? and give me also way to print the Array!!!   hello, you can initialize the array by this code // in your .h @interface 

Java Beginners

turbo C prog. Q3
} Example of ladder if: #include <stdio.h> main() { int a,b,c; printf...turbo C prog. Q3  What is the difference between if and ladder if ? Describe ladder if with example. What is the purpose of the parameter passing 

iPhone

Compiling Objective C
Compiling Objective C       In this section we will show you how to compile Objective C program on windows and Max OS x machine. Compiling Objective C program 

Mobile Applications Questions

Why NSString Objective C
". for example comparing strings in objective c if([statusString isEqualToString... C and how to define and initialize the NSString Class?   Why NSString Objective C NSStrings is a class that deals with strings in objective c 

Development process Questions

C Programming SubString Program
entered to check PROGRAM is exists in given three strings then output...C Programming SubString Program  Sir I want to Check whether the Single Substring is present in the given 3 string. characters. eg if i entered 

Java Interview Questions

How to create dynamic array in C?
How to create dynamic array in C?  How to create dynamic array in c programming language?   Dynamic Array in C Tutorial 

Java Beginners

c c++ - Java Beginners
c c++  Write a small record management application for a school...(); BufferedWriter output= new BufferedWriter(new FileWriter(f1)); BufferedReader...]; String name = f[1]; String c = f[2]; String note = f[3 

C Tutorials

C file read example
C file read example      ... in the given example, we prompt the user to enter the name of the file to read...;fclose(p); } Output will be displayed as: Download 

Java Beginners

example of function overriding in c++
example of function overriding in c++  require an example of function overriding in c 

Ajax Questions

c#
c#  how to find out the size of the BMP image in C 

CVS Questions

C++
C++  How can i write this in dev c 

Development process Questions

C++
C++  How can i write this in dev c 

Development process Questions

Print Output in C LAnaguage - Development process
Print Output in C LAnaguage  I want to Print Following Output in C Language with Combined For Loops Not Seprate Loops pleaseHelp Me 

Mobile Applications Questions

Struct in objective c example
Struct in objective c example  I am looking for a struct example in Objective C. Thanks 

HTML Questions

problem 2= C#
C# registration form If user fails to enter for example User Name... the code for the following form based on the criteria given below: User... If user fails to enter for example User Name then the Message box should pop up 

Java Beginners

C Program....PLEASE HELP
C Program....PLEASE HELP  For this assignment, you are to write... in the theta array. Returns the number of values successfully filled, which... cosndtheta nValues times to fill in r given theta. Returns zero if all input 

Mobile Applications Questions

Objective C Unichar example
Objective C Unichar example  A simple example of writing unichar in Objective C. Thanks.   An example that returns the value to every new line in the application. -(BOOL)NewLine:(unichar)c { if(c == '\n') return 

JDBC Questions

c++ - JDBC
c++  Can any one given a note on advantages and disadvantages of C 

Ajax Questions

c#
c#  how to find out the size of the BMP image 

Development process Questions

c++
c++  write a programme that calculates the area and circumference of a rectangle 

Java Beginners

c++
c++  i use turbo c++...i want to change the background color...what is the command for it and the header file used 

Development process Questions

C++
C++  dear sir How to create windows form application for login screen using C++? USER Name -TESTADMIN Password -testuser 

Java Beginners

c++
c++  i use turbo c++...i want to change the background color...what is the command for it and the header file used 

Java Beginners

c++
c++  i use turbo c++...i want to change the background color...what is the command for it and the header file used 

C# Tutorial

C calculate sum of first and last element of array
C calculate sum of first and last element of array In this section, you will learn how to calculate sum of first and last element from the array of five numbers. You can see in the given example, we have allowed the user to enter five 

Development process Questions

C++
C++  differenciate btw.-a)local & public variables b)pre-defined & user defined functions c)fnctn prototype,defination & fnctn code.use code examples 

Development process Questions

c++
c++  differenciate btw.-a)local & public variables b)pre-defined & user defined functions c)fnctn prototype,defination & fnctn code.use code examples 

Development process Questions

c++
c++  differenciate btw.-a)local & public variables b)pre-defined & user defined functions c)fnctn prototype,defination & fnctn code.use code examples 

Java Beginners

precedence operators c++ example
precedence operators c++ example  What is the precedence of operators in c++ and how does it works?   This might be helpful.. Operator precedence 

Advertisements Advertisements
 

 

 

DMCA.com