Take BCA Tuition from the Best Tutors

• Affordable fees
• 1-1 or Group class
• Flexible Timings
• Verified Tutors

Search in

# Write a program to exchange the first element with the last element of an array.

MS SQL SERVER DBA Trainer

IN C Prog: void swap(int *arr,int length) { int a; /*Third Variable*/ a = *arr; *arr = a; arr = a; } In Java: int (int arr) { int a; int len = arr.length; int ar = arr; a = ar; ar = a; ar = ar; return ar; }

Maths and Computer Science Tutor with 10 years Teaching experience

import java.io.*; import java.util.*; class SawpArray() { public static void main(String args) { int array = new int; int length = array.length; for(int i = 0; i < length; i++) { array = (int)(Math.random()*5); System.out.print(array); } System.out.println(""); ...
import java.io.*; import java.util.*; class SawpArray() { public static void main(String[] args) { int[] array = new int[5]; int length = array.length; for(int i = 0; i < length; i++) { array[i] = (int)(Math.random()*5); System.out.print(array[i]); } System.out.println(""); SwapFirstAndLast(array); } public static void SwapFirstAndLast(int[] array) { for(int i=0;iread less

Computer Wizard

public void swap(int arr) { int temp; temp=arr.length-1; arr.length-1=arr; arr=temp; System.out.println("print array elements") }

Tutor

#include iostream using namespace std; int main() { int a,temp; for(int i=0;i less than10;i++) //scan array { cin>>a; } for(int i=0;i>a; } temp=a; a=a; a=temp; for(int i=0;i>a; } return 0; }
#include iostream using namespace std; int main() { int a[10],temp; for(int i=0;i less than10;i++) //scan array { cin>>a[i]; } for(int i=0;i<10;i++) //print scanned array { cout>>a[i]; } temp=a[0]; a[0]=a[9]; a[9]=temp; for(int i=0;i<10;i++) //print exchanged array { cout>>a[i]; } return 0; } read less

Selenium Java Dealer ( SDET )

public class Arr { public static void main(String args) { // TODO Auto-generated method stub int a={2,4,6,8,10,12,15}; for(int i=0;i<=a.length;i++) { int d=a; a=a; a=d; System.out.println(a); } } }

Java developer

swap them

16 Yrs of Experience in Teaching

tmp=a; a=a; a=tmp;

God Gifted Mathematicians with more than 21 years of experience

Temp= a B=a A= temp

Java/J2ee,C,C++,DBMS Expert

import java.util.Arrays; public class ExchangeArrayElement { public static E void exchangeArrayElement( E arr){ int length = arr.length; for(int i=0,j=length-1;i read more
import java.util.Arrays; public class ExchangeArrayElement { public static E void exchangeArrayElement( E[] arr){ int length = arr.length; for(int i=0,j=length-1;iread less

International Corporate Trainer For dotnet Core ,Angular 2 ,C ,C++ and LPT Marathi for RBI Banking

You should learn Networking and hardware by joining profesional training institute and BCA degree is just for show case. It is useless

Related Questions

give me best coaching center in karnal of bca if anyone person who will give me best guideces with studies
you can search by google also. but best will be to touch your senior for best answer.
Rajattyagi
Is it correct to do BCA and MCA?
Yes it is great if you r really interested in computer field ..after BCA you can go either for job or for mca ...after mca definitely you will have a great path waiting for you
Pritam
Which is the best college in Delhi for a BCA?
Amity University, Noida Jamia Millia Islamia, Delhi Maharaja Agrasen Institute of Technology, Delhi. Are some of the best colleges
Asif
Which stream in an MBA is best after a BCA?
You can opt MBA IT...else MCA is also good after BCA if you have intrest in programing.
Mohen
How to create project in vb6.0?
Welcome to Free Visual Basic 6 (VB6) tutorial for beginners. This Visual Basic 6 (VB6) tutorial helps you to learn Visual Basic 6.0 (VB6) programming in your own. Assuming you all are beginners to visual...
Shinde

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Related Lessons

Components of Digital Marketing
Content marketing Search Engine Optimization (SEO) Paid Search (PPC) Email marketing Social Media Marketing Digital Display Marketing (Ad Ops) Web Analytics and Reporting Mobile Marketing 30...

Do You Know How Is Size Of Structure Defined?
Size of the structure is defined based on multiplies of bigger data type member in the structure. Example: If a structure contains integer, char, short data type, then size of the Structure will be multiples...

Networking Basic
Networking interview questionsWhat is LAN?LAN is a computer network that spans a relatively small area. Most LANs are confined to a single building or group of buildings. However, one LAN can be connected...

Dynamic Memory Allocation in C using malloc()
#include <stdio.h>#include <conio.h>//#include <malloc.h> OR#include <stdlib.h>void main(){ int *ptr, i, n, sum = 0; printf("how many elements ? "); scanf("%d", &n);...

National level ICT exam- Tanzania-IGCSE board national exam- Grade 9th
A sample question paper of IGCSE board national exam - Tanzania: Candidate’s No……………………………. MINISTRY OF EDUCATION AND...
Find BCA Tuition near you

Looking for BCA Tuition ?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

### Looking for BCA Tuition Classes?

The best tutors for BCA Tuition Classes are on UrbanPro

• Select the best Tutor
• Book & Attend a Free Demo
• Pay and start Learning

### Take BCA Tuition with the Best Tutors

The best Tutors for BCA Tuition Classes are on UrbanPro