الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

C question about printf and pointers

مغلق
بدأه zee في 12 يونيو 2002 · 5 رد · 415 مشاهدة · في ارشيف قسم C/C++
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

Salamat brothers and sisters, i cannot type in Arabic,

if i want to use the %n to print the number of charatcters a printf statement genrated on the screen. it does not work in one statement i have to use two statments in the code below tell me what's wrong, it works but it does not display number of characters. it works if i use two printf statements.

#include 
void main ()
{
int age;
printf (" your%n age is %d", &age, age);
}

another question what can i do to make the text display correctly, left to right.

#2

i really didn't understand u

edit ur post to see what changes I did for the code to appear like this

Coding on the Cloud and for the Cloud!

My Blog

#3

i cannot edit the thread to view what u did to fix the formatting.

#4

السلام عليكم

اخي العزيز

لابد من استخدام الداله printf مرتين . في المرة الاولى لن تتغير قيمه المتغير age وستظهر على الشاشه القيمه السابقه له .

بعد تنفيذ الجمله الاولى سيتم تغيير قيمه age ( في الجمله التي كتبتها انت ستكون القيمه 5 ) .

هناك حتى الأحلام أصبحت ممنوعة ...

إنه لعار أن ننتمي لهكذا أوطان ... لكن ... ربما العار أن نكون نحن أبناء لتلكم أوطان .. من يدري ؟!!

ليعلم أولئك ... إنّ الشعوب إنْ هي استيقظت تسحق ظُلامََهَا ...

There, even in dreams u r wanted

To be a programmer, how a nice dream it was

Leaving ...

أعيدوا لإسمي لونه المفضل

#5

thank you, I really like C/C++ better than any other langauge.. i wish if i can find an easy to format the text in this website to show correctly when i type in English. anyone knows how??.. and by the way i tried to look at the first thread ans see how the moderator fixed but it does not allow me to get into the edit mode.

#6

السلام عليكم

من قبل كان بالامكان استخدام left بين [] , الان لا اعلم ما هو البديل .

استخدم code2 و /code2 داخل []

مثال

This text form left to right .

بالنسيه للمشكله الاخرى فحلها هو : click " اقتباس " . لا يمكن عمل تحرير للموضوع بعد مرور فتره محدده اظنها 3 ساعات .

(f)

هناك حتى الأحلام أصبحت ممنوعة ...

إنه لعار أن ننتمي لهكذا أوطان ... لكن ... ربما العار أن نكون نحن أبناء لتلكم أوطان .. من يدري ؟!!

ليعلم أولئك ... إنّ الشعوب إنْ هي استيقظت تسحق ظُلامََهَا ...

There, even in dreams u r wanted

To be a programmer, how a nice dream it was

Leaving ...

أعيدوا لإسمي لونه المفضل

هذا الموضوع مغلق.

مواضيع مشابهة