angel-palstine
05-23-2006, 08:43 PM
السلام عليكم
ساعدوني اخواني مشرفين منتدي المبرمجين ولغات البرمجه في حل الاسئله لانه قرب الامتحان
الاسئله هي
1- Which of the following represent valid variable definitions?
a) unsigned char *num = "276811";
b) char *name = "Peter Pan";
c) unsigned double d = 0.0;
d) signed char = -22222;
2-The function srand(void) return the type
a) char
b) float
c) integer
d) void
3- The function prototype of a function is given by:
int fun(int,float,char) ;
what type of arguments will the function take and what type of value will it return?
a) void
b) float
c) char
d) int
4- What is the difference between the following :
a) static variable
b) global variable
5- How will you declare a two-dimensional array of characters?
6- true or fals
1-a long integer will require 16 bytes for its storage
2-declaration static char c, and char c, are equivalent
3-There will be no semicolon at the end of the preprocessor directive
4-a pointer can point to another pointer
5-function fscanf() returns an integer number
7- What does the following code print:
main ( )
{
int arr[ ]={4,5,6};
int j, *ptr;
ptr=arr;
for(j=0; j<3; j++)
printf(“%d”,*ptr+j));
}
8- what will be the output of the following program:
#include <stdio.h>
int func(void);
main ( )
{
int j;
for(j=0; j<4; j++)
printf(“\nyou’ve called me %d times”, func( ));
}
int func(void) {
static int k;
return(++k);
}
9- Given the following definition of a ff() function
void ff (int x, int y)
{
int temp = x;
x = y;
y = temp;
}
what will be the value of x and y after the following call:
x = 10;
y = 20;
ff(x, y);
10-How many bytes will be required for storing samples declared as under:
union sample
{
char s[4];
int n;
}
union samlpe samples;
11- Write a program to read a line of text from the keyboard and write it to a file
الرجاء المساعده
ساعدوني اخواني مشرفين منتدي المبرمجين ولغات البرمجه في حل الاسئله لانه قرب الامتحان
الاسئله هي
1- Which of the following represent valid variable definitions?
a) unsigned char *num = "276811";
b) char *name = "Peter Pan";
c) unsigned double d = 0.0;
d) signed char = -22222;
2-The function srand(void) return the type
a) char
b) float
c) integer
d) void
3- The function prototype of a function is given by:
int fun(int,float,char) ;
what type of arguments will the function take and what type of value will it return?
a) void
b) float
c) char
d) int
4- What is the difference between the following :
a) static variable
b) global variable
5- How will you declare a two-dimensional array of characters?
6- true or fals
1-a long integer will require 16 bytes for its storage
2-declaration static char c, and char c, are equivalent
3-There will be no semicolon at the end of the preprocessor directive
4-a pointer can point to another pointer
5-function fscanf() returns an integer number
7- What does the following code print:
main ( )
{
int arr[ ]={4,5,6};
int j, *ptr;
ptr=arr;
for(j=0; j<3; j++)
printf(“%d”,*ptr+j));
}
8- what will be the output of the following program:
#include <stdio.h>
int func(void);
main ( )
{
int j;
for(j=0; j<4; j++)
printf(“\nyou’ve called me %d times”, func( ));
}
int func(void) {
static int k;
return(++k);
}
9- Given the following definition of a ff() function
void ff (int x, int y)
{
int temp = x;
x = y;
y = temp;
}
what will be the value of x and y after the following call:
x = 10;
y = 20;
ff(x, y);
10-How many bytes will be required for storing samples declared as under:
union sample
{
char s[4];
int n;
}
union samlpe samples;
11- Write a program to read a line of text from the keyboard and write it to a file
الرجاء المساعده
