当前位置:七七学习网文档大全求职指南求职笔试面试笔试题目一些知名公司的笔试题目» 正文

一些知名公司的笔试题目

[10-10 21:21:19]   来源:http://www.77xue.com  笔试题目   阅读:8567
概要: } 2.完成程序,实现对数组的降序排序 #include <stdio.h> void sort( ); int main() { int array[]={45,56,76,234,1,34,23,2,3}; //数字任//意给出 sort( ); return 0; } void sort( ) { ____________________________________ | | | | |-| } 3.费波那其数列,1,1,2,3,5……
一些知名公司的笔试题目,标签:驾照笔试题目,腾讯笔试题目,http://www.77xue.com
  }
  2.完成程序,实现对数组的降序排序
  #include <stdio.h>
  void sort( );
  int main()
  {
   int array[]={45,56,76,234,1,34,23,2,3}; //数字任//意给出
   sort( );
   return 0;
  }
  void sort( )
  {
   ____________________________________
   | |
   | |
   |-----------------------------------------------------|
  }
  3.费波那其数列,1,1,2,3,5……编写程序求第十项。可以用递归,也可以用其他方法,但要说明你选择的理由。
  #include <stdio.h>
  int Pheponatch(int);
  int main()
  {
   printf("The 10th is %d",Pheponatch(10));
   return 0;
  }
  int Pheponatch(int N)
  {
  --------------------------------
  | |
  | |
  --------------------------------
  }
  4.下列程序运行时会崩溃,请找出错误并改正,并且说明原因。
  #include <stdio.h>
  #include <malloc.h>
  typedef struct{
   TNode* left;
   TNode* right;
   int value;
  } TNode;
  TNode* root=NULL;
  void append(int N);
  int main()
  {
   append(63);
   append(45);
   append(32);
   append(77);
   append(96);
   append(21);
   append(17); // Again, 数字任意给出
  }
  void append(int N)
  {
   TNode* NewNode=(TNode *)malloc(sizeof(TNode));
   NewNode->value=N;
  
   if(root==NULL)
   {
   root=NewNode;
   return;
   }
   else
   {
   TNode* temp;
   temp=root;
   while((N>=temp.value && temp.left!=NULL) || (N<temp. value && temp. right!=NULL
  ))
   {
   while(N>=temp.value && temp.left!=NULL)
   temp=temp.left;
   while(N<temp.value && temp.right!=NULL)
   temp=temp.right;
   }
   if(N>=temp.value)
   temp.left=NewNode;
   else
   temp.right=NewNode;
   return;
   }
  }

联想笔试题
  1.设计函数 int atoi(char *s)。

上一页  [1] [2] [3]  下一页


Tag:笔试题目驾照笔试题目,腾讯笔试题目求职指南 - 求职笔试面试 - 笔试题目

《一些知名公司的笔试题目》相关文章

联系我们 | 网站地图 | 范文大全 | 管理知识 | 教学教育 | 作文大全 | 语句好词
Copyright http://www.77xue.com--(七七学习网) All Right Reserved.
1 2 3 4 5 6 7 8 9 10