473,473 Members | 2,015 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

programming in C language

1 New Member
i have to make
4 vectors they are array vectors, and compare them contents
print one bye one, but in ascendent order , i want to use the burble method to compare they´re contents but i have to make the conditions.


#include <stdio.h>
#include <math.h>
int main()
{

int *a[]={1,2,3,43,42,12,43,5,65,76},
*b[]={98,65,43,23,21,3,4,54,65,76,6},
*c[]{32,3,2,43,4,6,67,7,45,23,6},
*d[]={23,45,7,7,87,8,98,65,6,87,34};
int i=0,j=0,point;

for(i=0;i<10;i++)
{
for(j=0;j<10;j++)
{
if(&(*a[j])>&(*a[j+1]))
{
atof(point) = &*(a+i);
&*(a[j])=&*(a[j+1]);
&*(a[j+1])=point;
}
}
printf("a=%d \n",a[i]);
}
system("pause");

}
Aug 25 '10 #1
2 1324
whodgson
542 Contributor
You will have to sort each one to get their elements into ascending order. How do you intend to compare them?
Remember each of these arrays have eleven elements so your loop condition needs to reflect this!
Expand|Select|Wrap|Line Numbers
  1. Also to help others please enclose your code in code tags
by selecting code and pressing # above.
Aug 26 '10 #2
weaknessforcats
9,208 Recognized Expert Moderator Expert
This code won't even compile.

You have arrays of integer pointers intialized to intigers. Won't work.
Aug 27 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

18
by: Roman Suzi | last post by:
;-) Just type into google "best programming language" and press (I am lucky) Sincerely yours, Roman Suzi -- rnd@onego.ru =\= My AI powered by GNU/Linux RedHat 7.3
3
by: Matt | last post by:
I always heard dialet of programming language. Or implementation of a programming language. What does it really mean? C++ is standardized already, does it mean it doesn't have any dialets? But I...
2
by: Matt | last post by:
I always heard dialet of programming language. For example, Objective-C is a dialet of C programming language. What does it really mean? C is already standardize, why there are dialets? Or when...
134
by: evolnet.regular | last post by:
I've been utilising C for lots of small and a few medium-sized personal projects over the course of the past decade, and I've realised lately just how little progress it's made since then. I've...
2
by: Juuso Hukkanen | last post by:
Language is quite good, if you don't learn the language syntax in 30 minutes complain and flame. t3d(TM) in a nutshell: -Languages main documentation is two pages (presented on the last two...
25
by: Dave | last post by:
I want to spend two minutes on my soapbox. I love C#. I am so productive in it it's ridiculous. But it's so easy to write code that uses poor design principles. Example: just making...
7
by: Robert Seacord | last post by:
The CERT/CC has just deployed a new web site dedicated to developing secure coding standards for the C programming language, C++, and eventually other programming language. We have already...
38
by: ifti_crazy | last post by:
I am VB6 programmer and wants to start new programming language but i am unable to deciced. i have read about Python, Ruby and Visual C++. but i want to go through with GUI based programming...
14
by: deko | last post by:
For building Windows desktop apps, the clear favorite is C#. But my clients can't afford to buy Microsoft products. So I need to develop software for Linux users and web applications. In the...
17
by: CoreyWhite | last post by:
I bought this book years ago, when I was just learning C++. Since then I've gone through every math course offered at my college, taken courses on coding C & thinking in terms how how to make the...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.