1
o 1
1 0 1
0 1 0 1
1 0 1 0 1
how to design this function format in c-language ?
Answers were Sorted based on User's Feedback
Answer / vignesh1988i
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,k,n;
clrscr();
printf("enter the terms :");
for(i=1;i<=n;i++)
{
if(i%2==0)
j=1;
else
j=0;
for(k=1;k<=i;k++)
{
j=!j;
printf("%d ",j);
}
printf("\n");
}
getch();
}
thank u
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / premkumar
main()
{
int i,j,k=1; clrscr();
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",k);
if(k==0)k=1;
else k=0;
}
printf("\n");
}
Is This Answer Correct ? | 0 Yes | 0 No |
main() { char not; not=!2; printf("%d",not); }
main() { char * strA; char * strB = I am OK; memcpy( strA, strB, 6); } a. Runtime error. b. I am OK c. Compile error d. I am O
main(){ unsigned int i; for(i=1;i>-2;i--) printf("c aptitude"); }
How to reverse a String without using C functions ?
33 Answers Matrix, TCS, Wipro,
Write a Program that Inputs 10 Numbers in an Array and Show the Maximum Number
Under linux environment can u please provide a c code for computing sum of series 1-2+3-4+5......n terms and -1+2-3+4-5...n terms..
what will be the output of this program? void main() { int a[]={5,10,15}; int i=0,num; num=a[++i] + ++i +(++i); printf("%d",num); }
Write a C function to search a number in the given list of numbers. donot use printf and scanf
#include<stdio.h> main() { int a[2][2][2] = { {10,2,3,4}, {5,6,7,8} }; int *p,*q; p=&a[2][2][2]; *q=***a; printf("%d----%d",*p,*q); }
char inputString[100] = {0}; To get string input from the keyboard which one of the following is better? 1) gets(inputString) 2) fgets(inputString, sizeof(inputString), fp)
what is oop?
How can i find first 5 natural Numbers without using any loop in c language????????