1. Write a c pgm to print 1 to 100 without using loops.
2. Write a c pgm for leap year
3. Write a c pgm fibbonacci series,factorial
4. Write a c pgm count no of lines , blanks, tabs in a
para(File concept)
5. Write a c pgm to print the letter as per given condition
i.e.. if u give 4
out put should b
4 4 4 4
4 4 4 4
4 4 4 4
4 4 4 4
6.how do get the o/p in number from 1 to 100 in the screen
without using control statement?
7. who do u print the word "hello world" without using
"printf" statement?
8. write sql program to get the detail of student in a
class?
Definitions:
structure
union
arrays
linkedlist
macros
directives
difference b/w
pre processorsDiffrence:
1.Constructors and destructors
2.Structure and Union
3.Array and Lists
4.pre processor...
5. Privillages in C++
6.structure and union
7.break and continue
8.while and dowhile Pgm..

Answers were Sorted based on User's Feedback



1. Write a c pgm to print 1 to 100 without using loops. 2. Write a c pgm for leap year 3. Write ..

Answer / vignesh1988i

1) 1 -100 without looping....

#include<stdio.h>
#include<conio.h>
int i=1;
void main()
{
i<=100 ? printf("%d\n",i) : getch(); //conditional operator
i++;
main(); //recursive calling of main() function
}


7) printing a string without printf()

#include<stdio.h>
#include<conio.h>
void main()
{
if(printf("hello world"))
getch();
}

5) printing ur sequence

#include<stdio.h>
#include<conio.h>
void main()
{
int m;
printf("enter ur number:");
scanf("%d",&m);
for(int i=1;i<=m;i++)
{
for(int j=1;j<=m;j++)
printf("%d ",m);
printf("\n");
}
getch();
}

6) printing 1-100 without using loops as well as control statement...

same answer which i have made for your QUESTON 1... and conditional operator is not a control statement...

3) a) very basic and simple logic fabbonacci series:

#include<stdio.h>
#include<conio.h>
void main()
{
int a=1,b=-1,c,n;
printf("enter the no. of terms :");
scanf("%d",&n);
for(int i=1;i<=m;i++)
{
c=a+b;
printf("%d\n",c);
b=a;
a=c;
}
getch();
}

b) Factorial :

#include<stdio.h>
#include<conio.h>
void main()
{
int m,j=1;
printf("enter ur number :");
scanf("%d",&m);
for(int i=1;i<=m;i++)
j=j*i;
printf("the factorial is : j");
getch();
}

remaining i ll answer today evening....

thank u

Is This Answer Correct ?    39 Yes 13 No

1. Write a c pgm to print 1 to 100 without using loops. 2. Write a c pgm for leap year 3. Write ..

Answer / karna

5.
void main()
{
int n,i,j;
printf("Enter the number");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=1;j<=n;j++)
{
printf("%d\t",n);
}
printf("\n");
}
getch();
}

Is This Answer Correct ?    25 Yes 7 No

1. Write a c pgm to print 1 to 100 without using loops. 2. Write a c pgm for leap year 3. Write ..

Answer / antony btitto

8:ANSWER
#include<stdio.h>
#include<conio.h>
void main()
{
int i=0,n;
printf(“enter the n value:);
scanf(“%d”,&n);
while(n>i)
{
printf(“this is while condition programe”);
}
getch();
}

Is This Answer Correct ?    10 Yes 5 No

Post New Answer

More C Interview Questions

What are the types of arrays in c?

0 Answers  


WAP TO ACCEPT STRING AND COUNT A COMES N TIMES B COMES N TIMES C COMES N TIMES D COMES N TIMES AND SO ON......... AT LAST UNTIL Z COMES N TIMES...............

3 Answers  


What is the meaning of int *x[]();?

1 Answers  


IS it possible to define a zero sized array in c.if it is possible how can the elements of that array can be accessed.array index starts from zero,if it is possible to define zero sized array how can be its first element can be accesseed.

5 Answers   TCS,


When should the const modifier be used?

0 Answers  






Can 'this' pointer by used in the constructor?

0 Answers  


What is a spanning Tree?

1 Answers   TCS,


program for swapping two strings by using pointers in c language

1 Answers  


What is an object?

5 Answers  


the output will be #include<stdio.h> int main () { int i; i = 9/2; printf("%i",i); return 0; }

4 Answers   CMC, TCS,


What is a C array and illustrate the how is it different from a list.

1 Answers   Amazon,


What is a void * in c?

0 Answers  


Categories