C free online test



TEST YOUR C SKILLS


C programming language free online testing objective types questions answers with explanation for interview or written test.



16 comments:

Sonu said...

syntactical que bt repeated thinkg require

Anonymous said...

Explanation needed:-

#include
#include
void quiz(int w); main() { int x= 5; clrscr(); quiz(5); } void quiz(int w) { if(w>1) { quiz(w/2); quiz(w/2); } printf("*"); }

pedro said...

pointers,functions and strings are my favorite chapters in c programming and i can really defend these in 100%. i love c programming

Anonymous said...

It Will only a print a star because in if condition you haven't written anything so only print one star on terminal

Anonymous said...

Mokka subject.

Anonymous said...

7 stars printed because
ist call
stack[5] return stmt 1st quiz...............(1)
2nd call
stack[5,2] return stmt 1st quiz................(2)
now w=1 <1 print *
return to (2) pop top element
now call by 2nd quiz stack[5,,2] return stmt 2nd quiz;...............(3)
w=1<1 print *
return to (3)pop top element
print * and return to (1)pop top element
stack [5,,,5] call by 2nd quiz...........................(4)
stack[5,,,5,2] call by 2nd quiz ........................(5)
now w=1<1 print *
return goto 5 print *;stack[5,,,5]pop top element
return goto 4 print *;stack[5,,,,]pop top element
now print final print one more * due to the 1st call;stack [];pop top element

Ganesh Padole said...

can u provide some questions on bit programming

Ladeira said...

q(5) -> q(2) -> q(1)
. | -> q(1)
. | -> q(2) -> q(1)
. -> q(1)

This is a recursive algorithm. Seven * are printed. The algorithm stops calling q recursivelly when w=1.

sheeba joseph said...

Can you tell the meaning of below code
while(num)
{
//
}

Lavenda chebet said...

identify the errors in the program,correct them and explain the output thereof;
main ()
{
int i;
printf("enter the number")
scanf"",&i);
if(i<=50)
printf("\n entered number is <50)

Lavenda chebet said...

identify the errors in the program,correct them and explain the output thereof;
main ()
{
int i;
printf("enter the number")
scanf"",&i);
if(i<=50)
printf("\n entered number is <50)

Nagaraju muthyala said...

while(num)
{
}
if u give no is 0 then condition is fail while wont exicute....
if u give non zero no conditio always true it goes to infinite loop

Nagaraju muthyala said...

main()
{
int i;
printf("enter i\n");
scanf("%d",&i);
if(i<=50)
printf("entered no is lessthan 50");
else
printf("entered no is not in less than 50");
}

Aldane M said...

hellop can i please get sme help

Aldane M said...

#include
#define MAX 1000

int main(){
char binaryNumber[MAX],hexaDecimal[MAX];
long int i=0;

printf("Enter any hexadecimal number: ");
scanf("%s",hexaDecimal);

printf("\nEquivalent binary value: ");
while(hexaDecimal[i]){
switch(hexaDecimal[i]){
case '0': printf("0000"); break;
case '1': printf("0001"); break;
case '2': printf("0010"); break;
case '3': printf("0011"); break;
case '4': printf("0100"); break;
case '5': printf("0101"); break;
case '6': printf("0110"); break;
case '7': printf("0111"); break;
case '8': printf("1000"); break;
case '9': printf("1001"); break;
case 'A': printf("1010"); break;
case 'B': printf("1011"); break;
case 'C': printf("1100"); break;
case 'D': printf("1101"); break;
case 'E': printf("1110"); break;
case 'F': printf("1111"); break;
case 'a': printf("1010"); break;
case 'b': printf("1011"); break;
case 'c': printf("1100"); break;
case 'd': printf("1101"); break;
case 'e': printf("1110"); break;
case 'f': printf("1111"); break;
default: printf("\nInvalid hexadecimal digit %c ",hexaDecimal[i]); return 0;
}
i++;
}

return 0;
}
why use char to store the binary value

Manikandan R said...

hi