Java leads a new life

Source: Internet
Author: User

  • Read the Xin Zou Teacher's blog and talk about your expectations of what is the relationship between teachers and students?
  • I think the relationship between teachers and students should be intimate, the teacher in class to explain the cooperation between teachers and students to inspire thinking.
  • What skills do you have (learning, chess, ball, musical instruments, art, games, ...). ) Better than most people? What are the successful experiences of expertise acquisition? What do you do for your next semester's study or a place to learn?
  • I learned the gourd silk, maybe others have not learned, so I think that the expertise of one is that they like interest, and the other is hard work, I think this for the next semester of study should be the first, interest slowly cultivated, through vacation study I don't seem to love this subject impulse.
  • How many lines of code did you write on the two courses of C language and data structure? Write a C program, do a statistic (code improvement, the comment lines, empty lines are not counted as a line of the program, then how to write). Last semester the students of the Java course completed the test code 3000 lines, some students reached 8000 lines, the experimental content of this semester will be increased, then, 5000 lines of code is you able to complete?
  • I believe that no matter how many lines of code, as long as you have confidence and to do it can be done, so my answer is yes.
  • Having learned C, how do you copy the contents of array A into array B? How do I find the number 5 in an integer array a? How do I sort an integer array a (small to large, from large to small)? Write the appropriate program
  • #include <stdio.h>#define N 30int main () {FILE *fp=null;char file_name[n];IntS,a=0,l=0; printf ( "Please enter the file name to be counted: \ n"); scanf ( "R");  while ((s=fgetc (FP))!=eof) {if ( S==s;} fclose (FP); if (A!=else if (s!= s!= '//') {l--;} printf ( "total%d rows \ n", l); return 0;}         

    I will study hard, write code, and try to complete 5000 lines of code.

    4. Having learned C, how do you copy the contents of array A into array B? How do I find the number 5 in an integer array a? How do I sort an integer array a (small to large, from large to small)? Write the appropriate program.

    Copy

    #Include<stdio.h>#define N 5int main () {int A[N]; int b[n]; int i; printf ( "Input b array number: \ n"); 0;i<n;i++) {scanf ( "%d" , &b[i]);} for (I=0;i<n;i++) {a[i]=b[i];} printf ( "contents of output array a \ n"); 0;i<n;i++) {printf ( "%d ", B[i]);}                

    Find

    #Include<stdio.h>#Define N 10IntMain(){int a[n];int i,j=0; printf ("Please enter a number (enter 0 to end): \ n");  For (i=0;i<n;i++) { scanf ("%d", &a[i]); if (a[i]==0) {break ;}} printf ("Find out if there is a digital 5:\n");  For (i=0;i<n;i++) { if (a[i]==5) {j + +;}} if (j=1)printf ("exists"),elseprintf ("does not Exist");}       

    Sort

    #include <stdio.h>#define N 10void Main () {int A[n],flag;int i,j,temp;printf"Please input%d numbers\n". N);for (I=0;i<n;i++) {scanf ( "%d", &a[i]); }printf ( "\ n"); 1;i<n;i++) {iflag=0; for (J=0;j<n-i;j++) {if (A[j] >a[j+1]) {temp=a[j]; A[j]=a[j+1]; a[j+ 1]=TEMP; Iflag=1;} if (Iflag==0) {break;}} printf (the array of order is: \n", A[i]);}}        

Java leads a new life

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.