2017年銀行供應(yīng)鏈金融產(chǎn)品成熱門板塊
展訊筆試真題分享

1.給出字符串pszbuff, 將其全部轉(zhuǎn)化為大寫,a轉(zhuǎn)化為a
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char *convert(const char* dest)
{
int ilen=0;
char *tmp=(char *)dest;
char *str;
/pic/>
while(*dest++) ilen++;
str = (char *)malloc(ilen);
while(*tmp)
{
if ( (*tmp>'a') && (*tmp<'z')) {
*str = *tmp + 'a' - 'a' ;
}else{
*str = *tmp;
}
str++;
tmp++;
}
*str='\0';
return str-ilen;
}
int main(int argc, char* argv[])
{
const char pszbuff[] = "abcd";
char *cc;
cc = convert(pszbuff);
printf("%s",cc);
getchar();
return 0;
}
2. 給出輸出結(jié)果,假設(shè)是cpu32位
int main(int argc, char* argv[])
{
char *str="1234567890";
long *plong= (long *)str;
char *pchar = str;
plong++;
pchar++;
printf("%d %d %s\n",sizeof(long),sizeof(plong),plong);
printf("%d %d %s\n",sizeof(char),sizeof(pchar),pchar);
printf("%d",sizeof(int));
getchar();
return 0;
}
答案:
4 4 567890
1 4 234567890
4
更多相關(guān)的筆試題目,大家敬請關(guān)注筆試欄目!
【銀行供應(yīng)鏈金融產(chǎn)品成板塊】相關(guān)文章:
物流知識:供應(yīng)鏈金融主要模式05-20
2016銀行從業(yè)資格證考試《個人理財》:金融產(chǎn)品與理財師02-28
2017如何拓展供應(yīng)鏈金融業(yè)務(wù)04-11
銀行從業(yè)公共基礎(chǔ)復(fù)習(xí)筆記:銀行金融環(huán)境04-11
銀行公共基礎(chǔ)知識點:銀行金融創(chuàng)新04-20
2017銀行從業(yè)公共基礎(chǔ)復(fù)習(xí)筆記:銀行金融環(huán)境03-04
《銀行從業(yè)公共基礎(chǔ)》輔導(dǎo):金融創(chuàng)新04-27
- 相關(guān)推薦