- 163.
-
162.
0/* Fig. 14.8: fig14_08.cTümünü Göster
Using signal handling */
1. include <stdio.h>
2. include <stdlib.h>
3. include <signal.h>
4. include <stdlib.h>
5. include <time.h>
void signalHandler( int signalValue ); /* prototype */
int main()
{
int i; /* counter used to loop 100 times */
int x; /* variable to hold random values between 1-50 */
signal( SIGINT, signalHandler ); /* register signal handler */
srand( clock() );
/* output numbers 1 to 100 */
for ( i = 1; i <= 100; i++ ) {
x = 1 + rand() % 50; /* generate random number to raise SIGINT */
/* raise SIGINT when x is 25 */
if ( x25 ) {
0 ) {
raise( SIGINT );
} /* end if */
printf( "%4d", i );
/* output n when i is a multiple of 10 */
if ( i % 10
printf( "n" );
} /* end if */
} /* end for */
printf("nn");
system("pause");
return 0; /* indicates successful termination */
} /* end main */
/* handles signal */
void signalHandler( int signalValue )
{
int response; /* user's response to signal (1 or 2) */
printf( "%s%d%sn%s",
"nInterrupt signal ( ", signalValue, " ) received.",
"Do you wish to continue ( 1 = yes or 2 = no )? " );
scanf( "%d", &response );
/* check for invalid responses */
while ( response != 1 && response != 2 ) {
printf( "( 1 = yes or 2 = no )? " );
scanf( "%d", &response );
} /* end while */
/* determine if it is time to exit */
if ( response == 1 ) {
/* reregister signal handler for next SIGINT */
signal( SIGINT, signalHandler );
} /* end if */
else {
exit( EXIT_SUCCESS );
} /* end else */
} /* end function signalHandler */
/***
* (C) Copyright 1992-2004 by Deitel & Associates, Inc. and *
* Pearson Education, Inc. All Rights Reserved. *
* *
* DISCLAIMER: The authors and publisher of this book have used their *
* best efforts in preparing the book. These efforts include the *
* development, research, and testing of the theories and programs *
* to determine their effectiveness. The authors and publisher make *
* no warranty of any kind, expressed or implied, with regard to these *
* programs or to the documentation contained in these books. The authors *
* and publisher shall not be liable in any event for incidental or *
* consequential damages in connection with, or arising out of, the *
* furnishing, performance, or use of these programs. *
***/ -
161.
0
-
160.
0ogecan
ciksinci nesil inci sözlük yazarı
(online)
genel ulan
bugün: 5
bu hafta: 5
toplam entry: 1096
toplam başlık: 0 - 159.
- 158.
- 157.
- 156.
-
155.
0boş
inci sözlük hatası: entry metni girilmelidir. -
154.
0olokolokolo
-
153.
0
- 152.
-
151.
0Müslümanlar Sayfamıza Davetlidir..
- 150.
-
149.
0The Way Way Back
-
148.
0yolla panpa
- 147.
-
146.
0bir şey yok kardeş
-
145.
0.enlarge img{
background-color:#eae9d4;
padding: 6px;
-webkit-box-shadow: 0 0 6px rgba(132, 132, 132, .75);
-moz-box-shadow: 0 0 6px rgba(132, 132, 132, .75);
box-shadow: 0 0 6px rgba(132, 132, 132, .75);
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.enlarge span{
position:absolute;
left: -9999px;
background-color:#eae9d4;
padding: 10px;
font-family: ‘Droid Sans’, sans-serif;
font-size:.9em;
text-align: center;
color: #495a62;
-webkit-box-shadow: 0 0 20px rgba(0,0,0, .75));
-moz-box-shadow: 0 0 20px rgba(0,0,0, .75);
box-shadow: 0 0 20px rgba(0,0,0, .75);
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius:8px;
}
.enlarge {
display:inline-block; /*places the images in a line*/
position: relative;
z-index: 0; /*resets the stack order of the list items – later we’ll increase this*/
margin:10px 40px 0 10px;
}
.enlarge span img{
padding:2px;
background:#ccc;
}
.enlarge:hover{
z-index: 50;
cursor:pointer;
}
.enlarge span img{
padding:2px;
background:#ccc;
}
.enlarge:hover span{
top: -300px; /*the distance from the bottom of the thumbnail to the top of the popup image*/
left: -20px; /*distance from the left of the thumbnail to the left of the popup image*/
}
.enlarge:hover:nth-child(2) span{
left: -100px;
}
.enlarge:hover:nth-child(3) span{
left: -200px;
} -
144.
0
-
ne ucan kedi bu muymuş
-
bakircan benden önce milli olacak diye korkuyorum
-
kekolar pislik içinde ki kekoreçi yer
-
enguzelhalinle ananınn dıbınaa
-
can tayfa son kez diyorum
-
05 08 2025 güncel sözlük reisleri
-
ya ramsteyn sende
-
abee türk kızlar çok şerefsizz
-
cfrkn adlı yazarın zırlak suratlı anasını
-
sigara ve alkole yapılan zamlar hakkında
-
olm kim gibayetvara vikins sozluğun
-
merhaba amım var bilginize
-
artık yalnızlık can sıkmaya başladı
-
netenyahu 1000lerce yil cehennemde yansa
-
cfrkn ve ucan kedi ananızı saç saça bağlayıp
-
kutsalsuku nerdesjn
-
91 puanla hizmetli oluyon
-
sözlük arada kasıyor yine
-
bekircanan sozluge gir
-
iyi ki 31 var
-
bugünde bekarız
-
sözlüğün şaklabanı 2025
-
selamlar ülkedeki turistlere kısıtlama
-
miletin nikiyle başlik açayim
-
akp guç zehirlenmesi yaşıyor
-
kim milyoner olmak istere katılan günay teyze
- / 1