C / C++ Code Portfolio



Download 112,15 Kb.
bet3/30
Sana01.03.2022
Hajmi112,15 Kb.
#475852
1   2   3   4   5   6   7   8   9   ...   30
Bog'liq
dddd

for (char *cp = line; cp = strtok(cp, DELIMITERS); cp = NULL)
{
// if the char pointed to by cp is a whitespace, increment cp to the next char
// this will result in the delimited string not starting with any whitespace
while (isspace(*cp))
++cp;
// print the delimited string
puts(cp);
}
}
}
// This file declares a 4-dimensional pointer array of type float

// the dimensions (left-to-right) of the pointer array


extern const int DIM0 = 2, DIM1 = 3, DIM2 = 4, DIM3 = 5;

// these DIM0*DIM1*DIM2 arrays, each containing DIM3 floats, contain the individual elements of the array


static float w1[DIM3], w2[DIM3], w3[DIM3], w4[DIM3], w5[DIM3], w6[DIM3], w7[DIM3], w8[DIM3], w9[DIM3],
w10[DIM3], w11[DIM3], w12[DIM3], w13[DIM3], w14[DIM3], w15[DIM3], w16[DIM3], w17[DIM3], w18[DIM3], w19[DIM3],
w20[DIM3], w21[DIM3], w22[DIM3], w23[DIM3], w24[DIM3];

// these DIM0*DIM1 arrays, each containing DIM2 pointers to floats, point to the rows of the array


static float *x1[DIM2] = {w1, w2, w3, w4}, *x2[DIM2] = {w5, w6, w7, w8}, *x3[DIM2] = {w9, w10, w11, w12},
*x4[DIM2] = {w13, w14, w15, w16}, *x5[DIM2] = {w17, w18, w19, w20,}, *x6[DIM2] = {w21, w22, w23, w24};

// these DIM0 arrays, each containing DIM1 pointers to pointers to floats, point to the pages of the array


// I have to use y_1 and y_2 instead of y1 and y2 because y1 is also a built-in function in math.h
static float **y_1[DIM1] = {x1, x2, x3}, **y_2[DIM1] = {x4, x5, x6};

// this pointer to pointer to pointer to floats points to the books (if you will) of the array


float ***pointerArray4D[DIM0] = {y_1, y_2};
// This program outputs the location of the first instance of a given value in an array

#include



int *FindFirstInt(const int *ptr, size_t count, int value)
{
for (unsigned int ptrIndex = 0; ptrIndex < count; ++ptrIndex)
{

Download 112,15 Kb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8   9   ...   30




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish