answersLogoWhite

0


Best Answer

'n' can be an identifier, '1' is a digit

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the meaning of n and 1 in C programming?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

C programming diamond shape for loops Problem and output sample is in the picture?

#include<stdio.h> main() { int i; for(i=1;i<=1;i++) { printf("*",i); } printf("\n"); for(i=1;i<=3;i++) { printf("*",i); } printf("\n"); for(i=1;i<=5;i++) { printf("*",i); } printf("\n"); for(i=1;i<=3;i++) { printf("*",i); } printf("\n"); for(i=1;i<=1;i++) { printf("*",i); } }


How do you generate Fibonacci series in c programming language?

#include<stdio.h> #include<conio.h> void main() { int a=-1,b=1,c=0,i,n; clrscr() printf("Enter the limit"); scanf(%d,&n) printf(the resultant fibonacci sequence is:) for(i=1;i<=n;i++) { c=a+b; printf(%d, c) a=b; b=c; } getch(); }


Can any one help me to write a program that Print even numbers from 0 to 100 that not a multiple of 6 in C programming?

for (int n = 0; n <=100; n++) // you may start n = 1, same result, 1 less iteration { if (n % 6) // or, n % 6 != 0 printf(n); }


C program for optimal merge pattern?

#include<iostream.h> #include<conio.h> void main() { clrscr(); int i,k,a[10],c[10],n,l; cout<<"Enter the no. of elements\t"; cin>>n; cout<<"\nEnter the sorted elments for optimal merge pattern"; for(i=0;i<n;i++) { cout<<"\t"; cin>>a[i]; } i=0;k=0; c[k]=a[i]+a[i+1]; i=2; while(i<n) { k++; if((c[k-1]+a[i])<=(a[i]+a[i+1])) { c[k]=c[k-1]+a[i]; } else { c[k]=a[i]+a[i+1]; i=i+2; while(i<n) { k++; if((c[k-1]+a[i])<=(c[k-2]+a[i])) { c[k]=c[k-1]+a[i]; } else { c[k]=c[k-2]+a[i]; }i++; } }i++; } k++; c[k]=c[k-1]+c[k-2]; cout<<"\n\nThe optimal sum are as follows......\n\n"; for(k=0;k<n-1;k++) { cout<<c[k]<<"\t"; } l=0; for(k=0;k<n-1;k++) { l=l+c[k]; } cout<<"\n\n The external path length is ......"<<l; getch(); }


What is the difference between backtracking and dynamic programming?

The only difference between dynamic programming and back tracking is DP allows overlapping of sub problems. (fib(n) = fib(n-1)+ fib (n-2)).

Related questions

How do you find factorial 5 in C programming?

to find the factorial we declare a variable n and initialize its value to 1 initiate a loop for example a for loop and multiply the numbers upto 5 code:- for(i=1,n=1;i<=5;i++) { n=n*i; }


How do you write infinity in C programming?

Infinite execution is obtained by, #include main( ) { int i; for(i=1;i>0;i++) { printf(''/n%d'',i); } }


C programming diamond shape for loops Problem and output sample is in the picture?

#include<stdio.h> main() { int i; for(i=1;i<=1;i++) { printf("*",i); } printf("\n"); for(i=1;i<=3;i++) { printf("*",i); } printf("\n"); for(i=1;i<=5;i++) { printf("*",i); } printf("\n"); for(i=1;i<=3;i++) { printf("*",i); } printf("\n"); for(i=1;i<=1;i++) { printf("*",i); } }


Meaning of NDIC?

what is the meaning of n d i c.


How do you generate Fibonacci series in c programming language?

#include<stdio.h> #include<conio.h> void main() { int a=-1,b=1,c=0,i,n; clrscr() printf("Enter the limit"); scanf(%d,&n) printf(the resultant fibonacci sequence is:) for(i=1;i<=n;i++) { c=a+b; printf(%d, c) a=b; b=c; } getch(); }


What is advantage of C programming?

hi my name is stinky carina n i smell like my best daddy, n i like it , n me n my dad is twins


Meaning of N C?

non conforming


How do you make a diamond using for loop in C plus plus?

Here is the code to do it: #include<stdio.h> main() { int n, c, k, space = 1; //Here we ask for the number of rows would be : printf("Enter number of rows\n"); scanf("%d",&n); space = n - 1; //This is the first half of the diamond for ( k = 1 ; k <= n ; k++ ) { for ( c = 1 ; c <= space ; c++ ) printf(" "); space--; for ( c = 1 ; c <= 2*k-1 ; c++) printf("*"); printf("\n"); } space = 1; //Here is the second half of the diamond for ( k = 1 ; k <= n - 1 ; k++ ) { for ( c = 1 ; c <= space; c++) printf(" "); space++; for ( c = 1 ; c <= 2*(n-k)-1 ; c++ ) printf("*"); printf("\n"); } return 0; } Hope that helped :)


Can any one help me to write a program that Print even numbers from 0 to 100 that not a multiple of 6 in C programming?

for (int n = 0; n <=100; n++) // you may start n = 1, same result, 1 less iteration { if (n % 6) // or, n % 6 != 0 printf(n); }


What does this mean 3 N of N in a P C F?

what is the full meaning of N.N.P.C.?


Least common multiple in C programming?

The following code for example is a solution (you could do it with less variables, but this is more readable):int GCD(int a, int b){int n, k, c;n = (a>b)?a:b;k = (a>b)?b:a;while (k){c = n%k;n=k;k=c;}return n;}


C program to convert gray code to binary code?

#include#includevoid main(){int a[10],i=0,c=0,n;printf("\n enter the gray code");scanf("%d",&n);while(n!=0){a[i]=n%10;n/=10;i++;c++;}for(i=c-1;i>=0;i--){if(a[i]==1){if(a[i-1]==1)a[i-1]=0;elsea[i-1]=1;}}printf("\n the binary code is");for(i=c-1;i>=0;i--)printf("%d",a[i]);getch();}