人気の面接質問と回答・オンラインテスト
面接対策、オンラインテスト、チュートリアル、ライブ練習のための学習プラットフォーム

集中型学習パス、模擬テスト、面接向けコンテンツでスキルを伸ばしましょう。

WithoutBook は、分野別の面接質問、オンライン練習テスト、チュートリアル、比較ガイドをひとつのレスポンシブな学習空間にまとめています。

面接準備

Language in C 面接の質問と回答

Test your skills through the online practice test: Language in C Quiz Online Practice Test

質問 16. How do I write a user-defined function, which deletes each character in a string str1, which matches any character in string str2?

The function is as shown below:

Compress ( char str1[], char str2[] )
{
int i, j, k ;

for ( i = k = 0 ; str1[i] != â??â?? ; i++ )
{
for ( j = 0 ; str2[j] != â??â?? && str2[j] !=
str1[i] ; j++ )
;
if ( str2[j] == â??â?? )
str1[k++] = str1[I] ;
}
str1[k] = â??â??
}

役に立ちましたか? コメントを追加 コメントを見る
 

質問 17. How does free( ) know how many bytes to free?

The malloc( ) / free( ) implementation remembers the size of each block allocated and returned, so it is not necessary to remind it of the size when freeing.

役に立ちましたか? コメントを追加 コメントを見る
 

質問 18. What is the use of randomize( ) and srand( ) function?

While generating random numbers in a program, sometimes we require to control the series of numbers that random number generator creates. The process of assigning the random number generators starting number is called seeding the generator. The randomize( ) and srand( ) functions are used to seed the random number generators. The randomize( ) function uses PC's clock to produce a random seed, whereas the srand( ) function allows us to specify the random number generator's starting value.

役に立ちましたか? コメントを追加 コメントを見る
 

質問 19. How do I determine amount of memory currently available for allocating?

We can use function coreleft( ) to get the amount of memory available for allocation. However, this function does not give an exact amount of unused memory. If, we are using a small memory model, coreleft( ) returns the amount of unused memory between the top of the heap and stack. If we are using a larger model, this function returns the amount of memory between the highest allocated memory and the end of conventional memory. The function returns amount of memory in terms of bytes.

役に立ちましたか? コメントを追加 コメントを見る
 

質問 20. How does a C program come to know about command line arguments?

When we execute our C program, operating system loads the program into memory. In case of DOS, it first loads 256 bytes into memory, called program segment prefix. This contains file table, environment segment, and command line information. When we compile the C program the compiler inserts additional code that parses the command, assigning it to the argv array, making the arguments easily accessible within our C program.

役に立ちましたか? コメントを追加 コメントを見る
 

ユーザー評価で最も役立つ内容:

著作権 © 2026、WithoutBook。