Saved Bookmarks
| 1. |
(a) Write the values of r and s after the execution of the following code :int p = 11;int q = 21;int r;int s;r = ++q;s = p++;r++;(b) What will be displayed in jTextField1 and jTextField2 after the following code is executed:int ndigits = 0;int N = 35;while (N > 12) { ndigits = ndigits + 1;N = N -10;}jTextField1.setText(" "+ ndigits) ;jTextField2.setText (" "+N) ; |
|
Answer» (a) r = 23 s = 12 (b) jTextField1 will contain : 3 jTextField2 will contain : 5 |
|