The 68000 I-band light curves of variable stars detected by the OGLE survey in the Large and Small Magellanic Clouds (MCs) are fitted by Fourier series, and also correlated with the DENIS and 2MAss all-sky release databases and with lists of spectroscopically confirmed M-, S- and C-stars. Lightcurves and the results of the lightcurve fitting (periods and amplitudes) and DENIS and 2MASS magnitudes are presented for 2277 M, S-, C-stars in the MCs. The following aspects are discussed: the K-band period-luminosity relations for the spectroscopically confirmed AGB stars, period changes over a timespan of about 17 years in a subset of about 400 LPVs, and candidate obscured AGB stars. The use of a sample of spectroscopically confirmed variables shows specifically that almost all carbon stars are brighter than the tip of the RGB, and occupy sequences A(+), B+, C and D. It is shown (for the LMC where there is a sufficient number of spectroscopically identified M-stars) that for sequences A+, B+, C the M-stars are on average fainter than the C-stars, as expected from an evolutionary point of view and previously observed in MC clusters. However, this is not so for sequence "D", suggesting that the origin of the so-called Long Secondary Periods is not related to an evolutionary effect. The fraction of objects that has a period in sequence "D" is also independent of chemical type. Three stars are identified that have been classified as oxygen-rich in the 1970s and carbon-rich in 1990s. Possibly they underwent a thermal pulse in the last 20 years, and dredged-up enough carbon to switch spectral type. The observations over almost two decades seem to suggest that up to 10% of AGB variables changed pulsation mode over that time span. More robust estimates will come from the ongoing and future (microlensing) photometric surveys. A sample of 570 variable red objects((J-K)>2.0 or (I-K)>4.0) is presented in which most stars are expected to be dust-obscured AGB stars. Estimates are presented for cut-offs in (J-K) which should be applied to minimise dust obscuration in K, and based on this, C- and K-star K-band PL-relations for large amplitude variables in the SMC and LMC are presented.