advertisements

شباب كيف حالكم
أتمنى أن تكونوا بخير
اليوم قمت بعمل شرح تطبيقي لما تعلمناه
في الدرس السابق
وأعتذر على التأخر في طرح الفديوهات
نسألكم الدعاء لنا بالتوفيق والسداد
كود 1 :
#include "stdio.h" main () { char tab[3][30]={{'\0'}}; int i=0; for( i=0;i<3 data-blogger-escaped-d="" data-blogger-escaped-i="" data-blogger-escaped-ntab="" data-blogger-escaped-printf="">> Enter Something : ",i); gets(tab[i]); } for( i=0;i<3 data-blogger-escaped-d="" data-blogger-escaped-i="" data-blogger-escaped-ntab="" data-blogger-escaped-printf="">> Enter Something : ",i); puts(tab[i]); } }
كود 2 :
#include "stdio.h" main () { //correct way to initialize table char tab[]={'\0'}; >> all table fields NULL char tab[]={0}; // we add 0 to first tab[0] but other compiler will add automatic zero to the rest // char tab[]={15}; >> tab[0] : 15 and the rest will be tab[rest] : 0 default value added by compiler int i=0; printf("enter something : "); gets(tab); puts(tab); }
شرح الفديو :
في أمان الله
0 commentaires :
Publier un commentaire