NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

1. for döngüsünde üç bölüm bulunur. Bunlar sırasıyla;
a) artım, koşul, başlangıç değeri
b) artım, başlangıç değeri, koşul
c) koşul, başlangıç değeri, artım
d) başlangıç değeri, koşul, artım
e) koşul, artım, başlangıç değeri

2. Aşağıdakilerden hangisi 1 ile 10 arasındaki sayıları ekrana yazar?
a) for (sayac = 1; sayac <= 10; sayac +=1)
printf("%dn", sayac);
b) for (sayac = 1; sayac < 10; sayac +=1)
printf("%dn", sayac);
c) for (sayac = 0; sayac <= 9; sayac +=1)
printf("%d ", sayac);
d) for (sayac = 1; sayac <> 10; sayac +=1)
printf("%dn", sayac);

3. Çerçeve içindeki ifadenin dengi hangisidir?
......
i= 2; j=3
for(;i<=5 && j>0;)
{...
i++; j--
....}

a) for (i=2; j=3; i<=5 && j>0; i++; j--) { }
b) for (i=2, j=3; i++; j--;i<=5 && j>0) { }
c) for (i=2, j=3; i<=5 && j>0; ++i, --j) { }
d) for (i++; j--; i<=5 && j>0; i=2; j=3) { }
e) for (i=2; i++; i<=5 && j>0; j--; j=3) { }

4. Sayacın 0'dan 100'e kadar 2'şer arttığı bir döngü kurmak için for döngüsü aşağıdakilerden hangisidir?
a) for (i=0; i<=100; i+=2) { }
b) for (i=0; i==100;i+=2) { }
c) for (i=0; i>=100; i+2) { }
d) for (i=0; ; i++) { }

5. Aşağıdaki çıkışı hangi ifade üretir?
1
22
333
4444
55555
a) for(a = 1; a <= 5; a = a + 1) {
for( b = 1; b <= 5; b = b + 1)
printf("%d", b);
printf("n");
}
b) for( a = 1; a <= 5; a = a + 1) {
for( b = 1; b <= a; b = b + 1)
printf("%d", a);
printf("n");
}
c) for( a = 1; a <= 5; a = a + 1) {
for( b = a; b <= 5; b = b + 1)
printf("%d", b);
printf("n");
}
d) for( a = 1; a <= 5; a = a + 1) {
for( b = 1; b < a; b = b + a)
printf("%d", b);
printf("n");
6. 10 ile 100 dahil aradaki sayıları toplayan ve toplam ismindeki değişkene atayan, toplam başlangıç değeri sıfır olan ifade aşağıdakilerden hangisidir?
a) for ( a = 10; a <= 100; a = a + 1) toplam = toplam + a;
b) for ( a = 10; a < 100; a = a + 1, toplam = 0)
toplam = toplam + a;
c) for ( a = 10; a <= 100, toplam = 0; a = a + 1)
toplam = toplam + a;
d) for ( a = 10, toplam = 0; a <= 100; a = a + 1)
toplam = toplam + a;

7. Aşağıdakilerden hangisi A-Z'yi yazar?
a) for ( a = 'A'; a < 'Z'; a = a + 1) printf ("%c", a);
b) for ( a = 'a'; a <= 'z'; a = a + 1) printf ("%c", &a);
c) for ( a = 'A'; a <= 'Z'; a = a + 1) printf ("%c", a);
d) for ( a = 'Z'; a <= 'A'; a = a + 1) printf ("%c", a);

8. Aşağıdaki programın çıktısı nasıl olur?
#include <stdio.h>
main()
{
int sayac1,sayac2;
int sonuc;
for (sayac1 = 1 ; sayac1 <= 10 ; sayac1++)
{
for (sayac2 = 1 ; sayac2 <= 3 ; sayac2++)
{
value = sayac1 * sayac2;
printf ("%3d ",sonuc);
}
printf("n"); } }
9. Aşağıdaki programın çıktısını yazınız.
#include<stdio.h>
#include<conio.h>
main()
{
float a,b,c;
clrscr();
a=1;
b=1;
printf("%.0f ",a);
for (c=1;c<10;++c)
{ printf("%.0f ",a);
b=b+a;
a=a+b;
}
getchar();
}


10. Aşağıdaki program parçasının kodu hangisidir?
a) for (i=1; N; işlem) b) for (i=n; işlem;)
c) for (i=1; işlem<=n;++i) d) for (i=1;i<=n;i++) işlem;
e) for (i=1; i<=n; i++) işlem;


     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.